File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 3e08171fc21f7fcc403aa315d8fb54f04c552841
2
+ refs/heads/master: e6b7f763853d0d847288111e7050841e05a885f4
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ tag ty_ {
153
153
ty_box ( @ty) ;
154
154
ty_vec ( @ty) ;
155
155
ty_tup ( vec[ @ty] ) ;
156
+ ty_rec ( vec[ tup ( ident, @ty) ] ) ;
156
157
ty_fn ( vec[ rec ( mode mode, @ty ty) ] , @ty) ; // TODO: effect
157
158
ty_path ( path, option. t [ def] ) ;
158
159
ty_mutable ( @ty) ;
Original file line number Diff line number Diff line change @@ -187,6 +187,23 @@ impure fn parse_ty(parser p) -> @ast.ty {
187
187
t = ast. ty_tup ( elems. node ) ;
188
188
}
189
189
190
+ case ( token. REC ) {
191
+ p. bump ( ) ;
192
+ impure fn parse_field ( parser p) -> tup ( ast . ident, @ast . ty) {
193
+ auto ty = parse_ty ( p) ;
194
+ auto id = parse_ident ( p) ;
195
+ ret tup( id, ty) ;
196
+ }
197
+ auto f = parse_field; // FIXME: trans_const_lval bug
198
+ auto elems =
199
+ parse_seq[ tup ( ast. ident , @ast. ty ) ] ( token. LPAREN ,
200
+ token. RPAREN ,
201
+ some ( token. COMMA ) ,
202
+ f, p) ;
203
+ hi = p. get_span ( ) ;
204
+ t = ast. ty_rec ( elems. node ) ;
205
+ }
206
+
190
207
case ( token. MUTABLE ) {
191
208
p. bump ( ) ;
192
209
auto t0 = parse_ty ( p) ;
You can’t perform that action at this time.
0 commit comments