@@ -46,7 +46,10 @@ type crate_ = rec(_mod module);
46
46
47
47
tag crate_directive_ {
48
48
cdir_expr( @expr) ;
49
- cdir_const ( @item) ;
49
+ // FIXME: cdir_let should be eliminated
50
+ // and redirected to the use of const stmt_decls inside
51
+ // crate directive blocks.
52
+ cdir_let( ident, @expr, vec[ @crate_directive] ) ;
50
53
cdir_src_mod ( ident, option. t [ filename] ) ;
51
54
cdir_dir_mod ( ident, option. t [ filename] , vec[ @crate_directive] ) ;
52
55
cdir_view_item ( @view_item) ;
@@ -137,6 +140,8 @@ type stmt = spanned[stmt_];
137
140
tag stmt_ {
138
141
stmt_decl( @decl) ;
139
142
stmt_expr ( @expr) ;
143
+ // These only exist in crate-level blocks.
144
+ stmt_crate_directive ( @crate_directive) ;
140
145
}
141
146
142
147
type local = rec ( option. t[ @ty] ty,
@@ -175,7 +180,6 @@ tag expr_ {
175
180
expr_do_while ( block, @expr, ann) ;
176
181
expr_alt ( @expr, vec[ arm] , ann) ;
177
182
expr_block ( block, ann) ;
178
- expr_crate_directive_block ( vec[ crate_directive_] ) ;
179
183
expr_assign ( @expr /* TODO: @expr|is_lval */ , @expr, ann) ;
180
184
expr_assign_op ( binop, @expr /* TODO: @expr|is_lval */ , @expr, ann) ;
181
185
expr_field ( @expr, ident, ann) ;
0 commit comments