Skip to content

Commit 0987b17

Browse files
committed
Small simplification in parser.rs' crate parsing
1 parent 1ad6929 commit 0987b17

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/comp/front/parser.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,13 +2181,7 @@ fn parse_crate_directive(&parser p) -> ast::crate_directive {
21812181
auto hi = p.get_hi_pos();
21822182
expect(p, token::RBRACE);
21832183
ret spanned(lo, hi, ast::cdir_let(id, x, v));
2184-
} else if (is_word(p, "use")) {
2185-
auto vi = parse_view_item(p);
2186-
ret spanned(lo, vi.span.hi, ast::cdir_view_item(vi));
2187-
} else if (is_word(p, "import")) {
2188-
auto vi = parse_view_item(p);
2189-
ret spanned(lo, vi.span.hi, ast::cdir_view_item(vi));
2190-
} else if (is_word(p, "export")) {
2184+
} else if (is_view_item(p)) {
21912185
auto vi = parse_view_item(p);
21922186
ret spanned(lo, vi.span.hi, ast::cdir_view_item(vi));
21932187
} else {

0 commit comments

Comments
 (0)