diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-09 23:03:46 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-10 12:07:19 -0700 |
| commit | ef9aa80438c61c1080269ca8b379decc96b49dd5 (patch) | |
| tree | c7a215485bf72f258ac27bcc2101f8383cc0e478 /src/libsyntax/parse | |
| parent | 233e595b617d3eb1fe50b9aba0b4844369d42398 (diff) | |
| download | rust-ef9aa80438c61c1080269ca8b379decc96b49dd5.tar.gz rust-ef9aa80438c61c1080269ca8b379decc96b49dd5.zip | |
Promote most restricted keywords to strict keywords
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 220fc7cf564..6e82e6d11b8 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -411,22 +411,13 @@ fn contextual_keyword_table() -> hashmap<~str, ()> { fn restricted_keyword_table() -> hashmap<~str, ()> { let words = str_hash(); let keys = ~[ - ~"as", - ~"assert", - ~"break", ~"const", ~"copy", - ~"do", ~"drop", - ~"else", ~"enum", ~"export", ~"extern", - ~"fail", ~"false", ~"fn", ~"for", - ~"if", ~"impl", ~"import", - ~"let", ~"log", ~"loop", - ~"match", ~"mod", ~"move", ~"mut", - ~"priv", ~"pub", ~"pure", - ~"ref", ~"return", + ~"fail", ~"fn", + ~"impl", + ~"priv", ~"pub", + ~"return", ~"struct", - ~"true", ~"trait", ~"type", - ~"unchecked", ~"unsafe", ~"use", - ~"while" + ~"unsafe" ]; for keys.each |word| { words.insert(word, ()); @@ -438,6 +429,19 @@ fn restricted_keyword_table() -> hashmap<~str, ()> { fn strict_keyword_table() -> hashmap<~str, ()> { let words = str_hash(); let keys = ~[ + ~"as", ~"assert", + ~"break", + ~"do", ~"drop", + ~"else", ~"enum", ~"export", ~"extern", + ~"false", ~"for", + ~"if", ~"import", + ~"let", ~"log", ~"loop", + ~"match", ~"mod", ~"move", ~"mut", + ~"pure", + ~"ref", + ~"true", ~"trait", ~"type", + ~"unchecked", ~"use", + ~"while" ]; for keys.each |word| { words.insert(word, ()); |
