File tree Expand file tree Collapse file tree 13 files changed +494
-491
lines changed Expand file tree Collapse file tree 13 files changed +494
-491
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ HashStmt
20
20
pub struct ExprStmt {
21
21
pub :
22
22
expr Expr
23
- ti table.Type
23
+ typ table.TypeRef
24
24
}
25
25
26
26
pub struct IntegerLiteral {
@@ -69,7 +69,7 @@ pub struct Field {
69
69
pub :
70
70
name string
71
71
// type_idx int
72
- typ table.Type
72
+ typ table.TypeRef
73
73
}
74
74
75
75
pub struct ConstDecl {
89
89
pub struct StructInit {
90
90
pub :
91
91
pos token.Position
92
- ti table.Type
92
+ typ table.TypeRef
93
93
fields []string
94
94
exprs []Expr
95
95
}
@@ -105,15 +105,15 @@ pub:
105
105
106
106
pub struct Arg {
107
107
pub :
108
- ti table.Type
108
+ typ table.TypeRef
109
109
name string
110
110
}
111
111
112
112
pub struct FnDecl {
113
113
pub :
114
114
name string
115
115
stmts []Stmt
116
- ti table.Type
116
+ typ table.TypeRef
117
117
args []Arg
118
118
is_pub bool
119
119
receiver Field
145
145
146
146
pub struct Return {
147
147
pub :
148
- pos token.Position
149
- expected_ti table.Type // TODO: remove once checker updated
150
- exprs []Expr
148
+ pos token.Position
149
+ expected_type table.TypeRef // TODO: remove once checker updated
150
+ exprs []Expr
151
151
}
152
152
153
153
/*
172
172
expr Expr
173
173
is_mut bool
174
174
mut :
175
- typ table.Type
175
+ typ table.TypeRef
176
176
pos token.Position
177
177
}
178
178
181
181
name string
182
182
expr Expr
183
183
mut :
184
- typ table.Type
184
+ typ table.TypeRef
185
185
}
186
186
187
187
pub struct File {
194
194
}
195
195
196
196
pub struct IdentVar {
197
- pub :
198
- typ table.Type
199
- // name string
197
+ pub mut :
198
+ typ table.TypeRef
199
+ // name string
200
200
}
201
201
202
202
type IdentInfo = IdentVar
225
225
op token.Kind
226
226
pos token.Position
227
227
left Expr
228
- left_type table.Type
228
+ left_type table.TypeRef
229
229
right Expr
230
- right_type table.Type
230
+ right_type table.TypeRef
231
231
}
232
232
233
233
/*
241
241
}
242
242
*/
243
243
244
-
245
244
pub struct PostfixExpr {
246
245
pub :
247
246
op token.Kind
270
269
cond Expr
271
270
stmts []Stmt
272
271
else_stmts []Stmt
273
- ti table.Type
272
+ typ table.TypeRef
274
273
left Expr // `a` in `a := if ...`
275
274
pos token.Position
276
275
}
@@ -354,7 +353,8 @@ pub struct ArrayInit {
354
353
pub :
355
354
pos token.Position
356
355
exprs []Expr
357
- ti table.Type
356
+ mut :
357
+ typ table.TypeRef
358
358
}
359
359
360
360
// s[10..20]
You can’t perform that action at this time.
0 commit comments