diff options
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ast.rs | 6 | ||||
| -rw-r--r-- | src/comp/syntax/ast_util.rs | 11 | ||||
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 1 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index f19bad3b478..582da17f465 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -44,11 +44,7 @@ tag def { def_use(def_id); def_native_ty(def_id); def_native_fn(def_id); - - /* A "fake" def for upvars. This never appears in the def_map, but - * freevars::def_lookup will return it for a def that is an upvar. - * It contains the actual def. */ - def_upvar(def_id, @def); + def_upvar(def_id, @def, bool /* writable */); } // The set of meta_items that define the compilation environment of the crate, diff --git a/src/comp/syntax/ast_util.rs b/src/comp/syntax/ast_util.rs index 2bad0d1c403..1052ef195fa 100644 --- a/src/comp/syntax/ast_util.rs +++ b/src/comp/syntax/ast_util.rs @@ -42,7 +42,7 @@ fn def_id_of_def(d: def) -> def_id { def_use(id) { ret id; } def_native_ty(id) { ret id; } def_native_fn(id) { ret id; } - def_upvar(id, _) { ret id; } + def_upvar(id, _, _) { ret id; } } } @@ -216,3 +216,12 @@ fn ternary_to_if(e: &@expr) -> @expr { _ { fail; } } } + +// Local Variables: +// mode: rust +// fill-column: 78; +// indent-tabs-mode: nil +// c-basic-offset: 4 +// buffer-file-coding-system: utf-8-unix +// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'"; +// End: diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 94f2dd3c99f..369e07080f4 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -173,7 +173,6 @@ fn bad_expr_word_table() -> hashmap<istr, ()> { words.insert(~"prove", ()); words.insert(~"native", ()); words.insert(~"fn", ()); - words.insert(~"block", ()); words.insert(~"lambda", ()); words.insert(~"pure", ()); words.insert(~"iter", ()); |
