diff options
| author | Rafael Ávila de Espíndola <[email protected]> | 2011-03-10 17:34:58 -0500 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <[email protected]> | 2011-03-10 17:36:41 -0500 |
| commit | 4ca0259b20bfc2f33f23e8b82864908fbb3b8133 (patch) | |
| tree | 1d215874467c4be9db02da596a73d0dea08667a5 /src/comp/front/eval.rs | |
| parent | Fix seemingly un-noticed thinko in structural copying code in rustboot. (diff) | |
| download | rust-4ca0259b20bfc2f33f23e8b82864908fbb3b8133.tar.xz rust-4ca0259b20bfc2f33f23e8b82864908fbb3b8133.zip | |
Update the current id when we create sub parsers.
Diffstat (limited to 'src/comp/front/eval.rs')
| -rw-r--r-- | src/comp/front/eval.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/comp/front/eval.rs b/src/comp/front/eval.rs index ac4b704b..efa9aa0d 100644 --- a/src/comp/front/eval.rs +++ b/src/comp/front/eval.rs @@ -393,9 +393,12 @@ impure fn eval_crate_directive(parser p, auto full_path = prefix + std.os.path_sep() + file_path; - auto p0 = new_parser(p.get_session(), e, 0, full_path); + auto start_id = p.next_def_id(); + auto p0 = new_parser(p.get_session(), e, start_id, full_path); auto m0 = parse_mod_items(p0, token.EOF); - auto im = ast.item_mod(id, m0, p.next_def_id()); + auto next_id = p0.next_def_id(); + p.set_def(next_id._1); + auto im = ast.item_mod(id, m0, next_id); auto i = @spanned(cdir.span, cdir.span, im); ast.index_item(index, i); append[@ast.item](items, i); |