From b8cca0971fc2dcd5f4bf4ac2ce82c1c635da0279 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 19 Oct 2010 14:54:10 -0700 Subject: Teach trans to allocate, initialize and load from local variables. --- src/comp/front/ast.rs | 2 +- src/comp/front/parser.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/comp/front') diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index e2dcf159..2135a97d 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -78,7 +78,7 @@ type local = rec(option[@ty] ty, type decl = spanned[decl_]; tag decl_ { - decl_local(local); + decl_local(@local); decl_item(@item); } diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index acf64c1b..68603e4a 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -629,7 +629,7 @@ io fn parse_let(parser p) -> @ast.decl { init = init, id = p.next_def_id()); - ret @spanned(lo, hi, ast.decl_local(local)); + ret @spanned(lo, hi, ast.decl_local(@local)); } io fn parse_auto(parser p) -> @ast.decl { @@ -648,7 +648,7 @@ io fn parse_auto(parser p) -> @ast.decl { init = init, id = p.next_def_id()); - ret @spanned(lo, hi, ast.decl_local(local)); + ret @spanned(lo, hi, ast.decl_local(@local)); } io fn parse_stmt(parser p) -> @ast.stmt { -- cgit v1.2.3