1
Fork 0

syntax: Add a source field to Local for tracking if it comes from lets or fors.

This commit is contained in:
Huon Wilson 2014-05-26 22:00:08 +10:00
parent 6fad19e16b
commit 6ddd40d436
5 changed files with 17 additions and 2 deletions

View file

@ -439,6 +439,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
init: Some(ex),
id: ast::DUMMY_NODE_ID,
span: sp,
source: ast::LocalLet,
};
let decl = respan(sp, ast::DeclLocal(local));
@respan(sp, ast::StmtDecl(@decl, ast::DUMMY_NODE_ID))
@ -462,6 +463,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
init: Some(ex),
id: ast::DUMMY_NODE_ID,
span: sp,
source: ast::LocalLet,
};
let decl = respan(sp, ast::DeclLocal(local));
@respan(sp, ast::StmtDecl(@decl, ast::DUMMY_NODE_ID))