Skip to content

Commit 2584e86

Browse files
committed
---
yaml --- r: 1430 b: refs/heads/master c: b2a0956 h: refs/heads/master v: v3
1 parent 9bd2728 commit 2584e86

File tree

5 files changed

+454
-83
lines changed

5 files changed

+454
-83
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: dcd65fac199d3caac4b1019304ef5e1b480f31ff
2+
refs/heads/master: b2a09562a6c0683ca528c866abc1ecc99b4bdcf0

trunk/src/comp/front/ast.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ type crate_ = rec(_mod module);
4646

4747
tag crate_directive_ {
4848
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]);
5053
cdir_src_mod(ident, option.t[filename]);
5154
cdir_dir_mod(ident, option.t[filename], vec[@crate_directive]);
5255
cdir_view_item(@view_item);
@@ -137,6 +140,8 @@ type stmt = spanned[stmt_];
137140
tag stmt_ {
138141
stmt_decl(@decl);
139142
stmt_expr(@expr);
143+
// These only exist in crate-level blocks.
144+
stmt_crate_directive(@crate_directive);
140145
}
141146

142147
type local = rec(option.t[@ty] ty,
@@ -175,7 +180,6 @@ tag expr_ {
175180
expr_do_while(block, @expr, ann);
176181
expr_alt(@expr, vec[arm], ann);
177182
expr_block(block, ann);
178-
expr_crate_directive_block(vec[crate_directive_]);
179183
expr_assign(@expr /* TODO: @expr|is_lval */, @expr, ann);
180184
expr_assign_op(binop, @expr /* TODO: @expr|is_lval */, @expr, ann);
181185
expr_field(@expr, ident, ann);

0 commit comments

Comments
 (0)