about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-07 18:08:21 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-10 19:04:26 -0700
commit298eb8c7260fe321e30d9c5e22f4ecefc82c4f64 (patch)
treeddd18bdc6c940595bd1df41cfa5d414ffa862a5d /src/libsyntax/parse
parent1a8a0a77b14c44d98501cd9fb0f14ed88d4c38d9 (diff)
downloadrust-298eb8c7260fe321e30d9c5e22f4ecefc82c4f64.tar.gz
rust-298eb8c7260fe321e30d9c5e22f4ecefc82c4f64.zip
Convert 'import' to 'use'. Remove 'import' keyword.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs12
-rw-r--r--src/libsyntax/parse/token.rs4
2 files changed, 2 insertions, 14 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 6cec730d83d..74370d005ce 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3345,15 +3345,6 @@ impl parser {
                 vis: visibility,
                 span: mk_sp(lo, self.last_span.hi)
             });
-        } else if self.eat_keyword(~"import") {
-            let view_paths = self.parse_view_paths();
-            self.expect(token::SEMI);
-            return iovi_view_item(@{
-                node: view_item_import(view_paths),
-                attrs: attrs,
-                vis: visibility,
-                span: mk_sp(lo, self.last_span.hi)
-            });
         } else if self.eat_keyword(~"export") {
             let view_paths = self.parse_view_paths();
             self.expect(token::SEMI);
@@ -3506,7 +3497,6 @@ impl parser {
             next_tok = self.look_ahead(2);
         };
         self.token_is_keyword(~"use", tok)
-            || self.token_is_keyword(~"import", tok)
             || self.token_is_keyword(~"export", tok)
             || (self.token_is_keyword(~"extern", tok) &&
                 self.token_is_keyword(~"mod", next_tok))
@@ -3516,8 +3506,6 @@ impl parser {
         let lo = self.span.lo, vis = self.parse_visibility();
         let node = if self.eat_keyword(~"use") {
             self.parse_use(vis)
-        } else if self.eat_keyword(~"import") {
-            view_item_import(self.parse_view_paths())
         } else if self.eat_keyword(~"export") {
             view_item_export(self.parse_view_paths())
         } else if self.eat_keyword(~"extern") {
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 5f1bdf2ff3e..cfef2f96581 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -279,7 +279,7 @@ pure fn is_bar(t: token) -> bool {
 
 
 mod special_idents {
-    import ast::ident;
+    use ast::ident;
     const underscore : ident = 0u;
     const anon : ident = 1u;
     const dtor : ident = 2u; // 'drop', but that's reserved
@@ -433,7 +433,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
         ~"do", ~"drop",
         ~"else", ~"enum", ~"export", ~"extern",
         ~"false", ~"for",
-        ~"if", ~"import",
+        ~"if",
         ~"let", ~"log", ~"loop",
         ~"match", ~"mod", ~"move", ~"mut",
         ~"pure",