diff options
| author | Brian Anderson <[email protected]> | 2011-03-13 19:40:25 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-03-13 19:40:25 -0400 |
| commit | bbb6836da003be71744b6e6ea7af1fd4674f8291 (patch) | |
| tree | fc7780f767666cced8406818806216bee3863c91 /src/comp/front/eval.rs | |
| parent | Remove extra blocks from the translation of expr_block (diff) | |
| parent | Add llvmext/include to the list of include directories to hopefully put out t... (diff) | |
| download | rust-bbb6836da003be71744b6e6ea7af1fd4674f8291.tar.xz rust-bbb6836da003be71744b6e6ea7af1fd4674f8291.zip | |
Merge branch 'master' into recursive-elseif
Conflicts:
src/comp/middle/typeck.rs
Diffstat (limited to 'src/comp/front/eval.rs')
| -rw-r--r-- | src/comp/front/eval.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/comp/front/eval.rs b/src/comp/front/eval.rs index 881797c9..21a764df 100644 --- a/src/comp/front/eval.rs +++ b/src/comp/front/eval.rs @@ -42,7 +42,7 @@ fn val_is_bool(val v) -> bool { fn val_is_int(val v) -> bool { alt (v) { - case (val_bool(_)) { ret true; } + case (val_int(_)) { ret true; } case (_) { } } ret false; @@ -386,9 +386,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); |