From ef9aa80438c61c1080269ca8b379decc96b49dd5 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 9 Sep 2012 23:03:46 -0700 Subject: Promote most restricted keywords to strict keywords --- src/libsyntax/parse/token.rs | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'src/libsyntax/parse') 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, ()); -- cgit 1.4.1-3-g733a5