about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Leibig <brian@brianleibig.com>2015-02-10 16:51:02 -0800
committerBrian Leibig <brian@brianleibig.com>2015-02-10 17:59:01 -0800
commit03cc48c38ddd3bbdf7f928dede249e7c8527edd0 (patch)
tree479c78b616b3f1d3b6c10413ef46d28b77de785a /src
parent41d6513b8f0429c6775097a7b69570a4c912e8b9 (diff)
downloadrust-03cc48c38ddd3bbdf7f928dede249e7c8527edd0.tar.gz
rust-03cc48c38ddd3bbdf7f928dede249e7c8527edd0.zip
Bison grammar: refactor items to allow "extern crate" in stmts
Diffstat (limited to 'src')
-rw-r--r--src/grammar/parser-lalr.y10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/grammar/parser-lalr.y b/src/grammar/parser-lalr.y
index 26168f6f5cb..2788476ebfe 100644
--- a/src/grammar/parser-lalr.y
+++ b/src/grammar/parser-lalr.y
@@ -258,11 +258,7 @@ mod_item
 
 // items that can appear outside of a fn block
 item
-: item_static
-| item_const
-| item_type
-| block_item
-| view_item
+: stmt_item
 | item_macro
 ;
 
@@ -272,8 +268,7 @@ stmt_item
 | item_const
 | item_type
 | block_item
-| use_item
-| extern_fn_item
+| view_item
 ;
 
 item_static
@@ -295,7 +290,6 @@ view_item
 : use_item
 | extern_fn_item
 | EXTERN CRATE ident ';'                      { $$ = mk_node("ViewItemExternCrate", 1, $3); }
-| EXTERN CRATE ident '=' str ';'              { $$ = mk_node("ViewItemExternCrate", 2, $3, $5); }
 | EXTERN CRATE str AS ident ';'               { $$ = mk_node("ViewItemExternCrate", 2, $3, $5); }
 ;