@@ -5,6 +5,7 @@ import std._vec;
5
5
import util. common . span ;
6
6
import util. common . spanned ;
7
7
import util. common . ty_mach ;
8
+ import util. common . filename ;
8
9
9
10
type ident = str ;
10
11
@@ -43,6 +44,18 @@ tag def {
43
44
type crate = spanned[ crate_ ] ;
44
45
type crate_ = rec ( _mod module ) ;
45
46
47
+ tag crate_directive_ {
48
+ cdir_expr( @expr) ;
49
+ cdir_src_mod ( ident, option. t [ filename] ) ;
50
+ cdir_dir_mod ( ident, option. t [ filename] , vec[ crate_directive] ) ;
51
+ cdir_view_item ( @view_item) ;
52
+ cdir_meta ( @meta_item) ;
53
+ cdir_syntax ( path) ;
54
+ cdir_auth ( path, effect) ;
55
+ }
56
+ type crate_directive = spanned[ crate_directive_ ] ;
57
+
58
+
46
59
type meta_item = spanned[ meta_item_ ] ;
47
60
type meta_item_ = rec ( ident name, str value ) ;
48
61
@@ -161,6 +174,7 @@ tag expr_ {
161
174
expr_do_while ( block, @expr, ann) ;
162
175
expr_alt ( @expr, vec[ arm] , ann) ;
163
176
expr_block ( block, ann) ;
177
+ expr_crate_directive_block ( vec[ crate_directive_] ) ;
164
178
expr_assign ( @expr /* TODO: @expr|is_lval */ , @expr, ann) ;
165
179
expr_assign_op ( binop, @expr /* TODO: @expr|is_lval */ , @expr, ann) ;
166
180
expr_field ( @expr, ident, ann) ;
0 commit comments