Skip to content

Commit c448436

Browse files
committed
---
yaml --- r: 530 b: refs/heads/master c: a1b57e6 h: refs/heads/master v: v3
1 parent f5ccc6d commit c448436

File tree

3 files changed

+162
-1
lines changed

3 files changed

+162
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 49f668dff306ae76ad83f2f82c032940f723b26c
2+
refs/heads/master: a1b57e69cdffe699a59f1f09437ae161b32abc27

trunk/src/comp/fe/token.rs

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
import util.common.ty_mach;
2+
3+
type op = tag
4+
(PLUS(),
5+
MINUS(),
6+
STAR(),
7+
SLASH(),
8+
PERCENT(),
9+
EQ(),
10+
LT(),
11+
LE(),
12+
EQEQ(),
13+
NE(),
14+
GE(),
15+
GT(),
16+
NOT(),
17+
TILDE(),
18+
CARET(),
19+
AND(),
20+
ANDAND(),
21+
OR(),
22+
OROR(),
23+
LSL(),
24+
LSR(),
25+
ASR());
26+
27+
type token = tag
28+
(OP(op),
29+
OPEQ(op),
30+
AS(),
31+
WITH(),
32+
33+
/* Structural symbols */
34+
AT(),
35+
DOT(),
36+
COMMA(),
37+
SEMI(),
38+
COLON(),
39+
RARROW(),
40+
SEND(),
41+
LARROW(),
42+
LPAREN(),
43+
RPAREN(),
44+
LBRACKET(),
45+
RBRACKET(),
46+
LBRACE(),
47+
RBRACE(),
48+
49+
/* Module and crate keywords */
50+
MOD(),
51+
USE(),
52+
AUTH(),
53+
META(),
54+
55+
/* Metaprogramming keywords */
56+
SYNTAX(),
57+
POUND(),
58+
59+
/* Statement keywords */
60+
IF(),
61+
ELSE(),
62+
DO(),
63+
WHILE(),
64+
ALT(),
65+
CASE(),
66+
67+
FAIL(),
68+
DROP(),
69+
70+
IN(),
71+
FOR(),
72+
EACH(),
73+
PUT(),
74+
RET(),
75+
BE(),
76+
77+
/* Type and type-state keywords */
78+
TYPE(),
79+
CHECK(),
80+
CLAIM(),
81+
PROVE(),
82+
83+
/* Effect keywords */
84+
IO(),
85+
STATE(),
86+
UNSAFE(),
87+
88+
/* Type qualifiers */
89+
NATIVE(),
90+
AUTO(),
91+
MUTABLE(),
92+
93+
/* Name management */
94+
IMPORT(),
95+
EXPORT(),
96+
97+
/* Value / stmt declarators */
98+
LET(),
99+
100+
/* Magic runtime services */
101+
LOG(),
102+
SPAWN(),
103+
BIND(),
104+
THREAD(),
105+
YIELD(),
106+
JOIN(),
107+
108+
/* Literals */
109+
LIT_INT(int),
110+
LIT_UINT(int),
111+
LIT_MACH_INT(ty_mach, int),
112+
LIT_STR(str),
113+
LIT_CHAR(int),
114+
LIT_BOOL(bool),
115+
116+
/* Name components */
117+
IDENT(str),
118+
IDX(int),
119+
UNDERSCORE(),
120+
121+
/* Reserved type names */
122+
BOOL(),
123+
INT(),
124+
UINT(),
125+
FLOAT(),
126+
CHAR(),
127+
STR(),
128+
MACH(ty_mach),
129+
130+
/* Algebraic type constructors */
131+
REC(),
132+
TUP(),
133+
TAG(),
134+
VEC(),
135+
ANY(),
136+
137+
/* Callable type constructors */
138+
FN(),
139+
ITER(),
140+
141+
/* Object type */
142+
OBJ(),
143+
144+
/* Comm and task types */
145+
CHAN(),
146+
PORT(),
147+
TASK(),
148+
149+
BRACEQUOTE(str),
150+
EOF());
151+
152+
153+
154+
// Local Variables:
155+
// fill-column: 78;
156+
// indent-tabs-mode: nil
157+
// c-basic-offset: 4
158+
// buffer-file-coding-system: utf-8-unix
159+
// compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
160+
// End:

trunk/src/comp/rustc.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ mod fe {
77
mod ast;
88
mod lexer;
99
mod parser;
10+
mod token;
1011
}
1112

1213
mod driver {

0 commit comments

Comments
 (0)