diff options
| author | Graydon Hoare <[email protected]> | 2011-01-13 17:42:28 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-01-13 17:42:28 -0800 |
| commit | f3c3fc03537d9aca36b0ce5956ab8d5b760784b4 (patch) | |
| tree | 802723cba8094d8aba500e9a8d6774c86ea2f54a /src/comp/front/ast.rs | |
| parent | Add or enable some tests. (diff) | |
| download | rust-f3c3fc03537d9aca36b0ce5956ab8d5b760784b4.tar.xz rust-f3c3fc03537d9aca36b0ce5956ab8d5b760784b4.zip | |
Change single-ident expr_ident to greedy/fat multi-ident expr_path, to handle the module-path/value-indexing distinction.
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index c8e36dde..1ee50c2a 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -8,9 +8,8 @@ import util.common.ty_mach; type ident = str; -type name_ = rec(ident ident, vec[@ty] types); -type name = spanned[name_]; -type path = vec[name]; +type path_ = rec(vec[ident] idents, vec[@ty] types); +type path = spanned[path_]; type crate_num = int; type def_num = int; @@ -158,7 +157,7 @@ tag expr_ { expr_assign_op(binop, @expr /* TODO: @expr|is_lval */, @expr, ann); expr_field(@expr, ident, ann); expr_index(@expr, @expr, ann); - expr_name(name, option.t[def], ann); + expr_path(path, option.t[def], ann); } type lit = spanned[lit_]; |