Skip to content

Commit 528373b

Browse files
committed
Turn most contextual keywords into restricted keywords
1 parent f53c294 commit 528373b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/libsyntax/parse/token.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,7 @@ fn keyword_table() -> hashmap<~str, ()> {
382382
fn contextual_keyword_table() -> hashmap<~str, ()> {
383383
let words = str_hash();
384384
let keys = ~[
385-
~"as",
386-
~"else",
387-
~"move",
388-
~"priv", ~"pub",
389385
~"self", ~"static",
390-
~"use"
391386
];
392387
for keys.each |word| {
393388
words.insert(word, ());
@@ -412,6 +407,7 @@ fn contextual_keyword_table() -> hashmap<~str, ()> {
412407
fn restricted_keyword_table() -> hashmap<~str, ()> {
413408
let words = str_hash();
414409
let keys = ~[
410+
~"as",
415411
~"assert",
416412
~"break",
417413
~"const", ~"copy",
@@ -421,11 +417,11 @@ fn restricted_keyword_table() -> hashmap<~str, ()> {
421417
~"if", ~"impl", ~"import",
422418
~"let", ~"log", ~"loop",
423419
~"match", ~"mod", ~"move", ~"mut",
424-
~"pure",
420+
~"priv", ~"pub", ~"pure",
425421
~"ref", ~"return",
426422
~"struct",
427423
~"true", ~"trait", ~"type",
428-
~"unchecked", ~"unsafe",
424+
~"unchecked", ~"unsafe", ~"use",
429425
~"while"
430426
];
431427
for keys.each |word| {

0 commit comments

Comments
 (0)