diff options
Diffstat (limited to 'src/comp/front/parser.rs')
| -rw-r--r-- | src/comp/front/parser.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 1cf8af2d..dd5a6b50 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -1738,7 +1738,14 @@ impure fn parse_use_and_imports(parser p) -> vec[ast.use_or_import] { } } -impure fn parse_crate(parser p) -> @ast.crate { +impure fn parse_crate_from_crate_file(parser p) -> @ast.crate { + auto lo = p.get_span(); + auto hi = lo; + auto m = parse_mod_items(p, token.EOF); + ret @spanned(lo, hi, rec(module=m)); +} + +impure fn parse_crate_from_source_file(parser p) -> @ast.crate { auto lo = p.get_span(); auto hi = lo; auto m = parse_mod_items(p, token.EOF); |