about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-09 16:53:47 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-09 16:53:47 -0700
commit528373b79b63ef9104325bb71cfcf39752352b80 (patch)
tree4ed55c8e91e2ed2b912568a22cd44aa6a219eaf2 /src/libsyntax/parse
parentf53c2948aa6bd0ffc47527e977cb278d48467a75 (diff)
downloadrust-528373b79b63ef9104325bb71cfcf39752352b80.tar.gz
rust-528373b79b63ef9104325bb71cfcf39752352b80.zip
Turn most contextual keywords into restricted keywords
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index cd7f75b15be..aa2c9ab3a5e 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -382,12 +382,7 @@ fn keyword_table() -> hashmap<~str, ()> {
 fn contextual_keyword_table() -> hashmap<~str, ()> {
     let words = str_hash();
     let keys = ~[
-        ~"as",
-        ~"else",
-        ~"move",
-        ~"priv", ~"pub",
         ~"self", ~"static",
-        ~"use"
     ];
     for keys.each |word| {
         words.insert(word, ());
@@ -412,6 +407,7 @@ fn contextual_keyword_table() -> hashmap<~str, ()> {
 fn restricted_keyword_table() -> hashmap<~str, ()> {
     let words = str_hash();
     let keys = ~[
+        ~"as",
         ~"assert",
         ~"break",
         ~"const", ~"copy",
@@ -421,11 +417,11 @@ fn restricted_keyword_table() -> hashmap<~str, ()> {
         ~"if", ~"impl", ~"import",
         ~"let", ~"log", ~"loop",
         ~"match", ~"mod", ~"move", ~"mut",
-        ~"pure",
+        ~"priv", ~"pub", ~"pure",
         ~"ref", ~"return",
         ~"struct",
         ~"true", ~"trait", ~"type",
-        ~"unchecked", ~"unsafe",
+        ~"unchecked", ~"unsafe", ~"use",
         ~"while"
     ];
     for keys.each |word| {