Teach trans to allocate, initialize and load from local variables.
This commit is contained in:
parent
10d628dbd0
commit
b8cca0971f
6 changed files with 174 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue