-
Notifications
You must be signed in to change notification settings - Fork 212
/
Red.red
140 lines (135 loc) · 1.8 KB
/
Red.red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
; https://github.com/red/red
; https://www.red-lang.org/p/documentation.html
; https://static.red-lang.org/red-system-specs.html
;! keywords ===========================================================
; Reserved keywords
alias all and any as assert
break
case catch comment context continue
declare
either exit
func function
if
loop
not null
or
pop push
return
size? switch
throw
until use
while with
xor
; intrinsics https://github.com/red/red/blob/master/compiler.r
all any
break
case construct context continue
does
either exit
forall foreach forever func function
get
has
if
loop
object
reduce remove-each repeat return routine
set switch
try
unless until
while
; logic-words https://github.com/red/red/blob/master/compiler.r
true false yes no on off
; others
none namespace
variadic
;! directive ===========================================================
; Compiler directives
#call
#case
#default
#define
#do
#either
#enum
#export
#get
#get-definition
#if
#import
#in
#include
#inline
#pop-path
#register-intrinsics
#script
#switch
#syscall
#system
#system-global
#typecheck
#u16
#user-code
#verbose
;! datatypes ===========================================================
; https://github.com/red/red/blob/master/environment/datatypes.red
unset!
none!
logic!
block!
string!
integer!
word!
error!
typeset!
file!
url!
set-word!
get-word!
lit-word!
refinement!
binary!
paren!
char!
issue!
path!
set-path!
get-path!
lit-path!
native!
action!
op!
function!
routine!
object!
bitset!
float!
point!
vector!
map!
hash!
pair!
percent!
tuple!
image!
time!
tag!
email!
handle!
date!
port!
money!
ref!
event!
; https://github.com/red/red/blob/master/system/emitter.r
byte!
float32!
float64!
pointer!
c-string!
subroutine!
byte-ptr!
int-ptr!
struct!
;! functions ===========================================================
print
print-line