summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-09-25 17:56:54 -0700
committerBrian Anderson <banderson@mozilla.com>2013-09-26 15:04:13 -0700
commit88272a4f2421fdf095ee3573517ce6d9f654fedc (patch)
tree86926f9231a9b1a4417f79aa3da98c99bb4e4b7a /src/libsyntax/parse/token.rs
parent41826c48eddfb964b830229dff6f0480ac649827 (diff)
downloadrust-88272a4f2421fdf095ee3573517ce6d9f654fedc.tar.gz
rust-88272a4f2421fdf095ee3573517ce6d9f654fedc.zip
Add 'continue' as a synonym for 'loop'
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 6cc1058954c..eec4a81b2cf 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -477,14 +477,15 @@ fn mk_fresh_ident_interner() -> @ident_interner {
         "use",                // 61
         "while",              // 62
         "in",                 // 63
-
-        "be",                 // 64
-        "pure",               // 65
-        "yield",              // 66
-        "typeof",             // 67
-        "alignof",            // 68
-        "offsetof",           // 69
-        "sizeof",             // 70
+        "continue",           // 64
+
+        "be",                 // 65
+        "pure",               // 66
+        "yield",              // 67
+        "typeof",             // 68
+        "alignof",            // 69
+        "offsetof",           // 70
+        "sizeof",             // 71
     ];
 
     @interner::StrInterner::prefill(init_vec)
@@ -628,6 +629,7 @@ pub mod keywords {
         Unsafe,
         Use,
         While,
+        Continue,
 
         // Reserved keywords
         Alignof,
@@ -676,14 +678,15 @@ pub mod keywords {
                 Unsafe => Ident { name: 60, ctxt: 0 },
                 Use => Ident { name: 61, ctxt: 0 },
                 While => Ident { name: 62, ctxt: 0 },
-
-                Alignof => Ident { name: 68, ctxt: 0 },
-                Be => Ident { name: 64, ctxt: 0 },
-                Offsetof => Ident { name: 69, ctxt: 0 },
-                Pure => Ident { name: 65, ctxt: 0 },
-                Sizeof => Ident { name: 70, ctxt: 0 },
-                Typeof => Ident { name: 67, ctxt: 0 },
-                Yield => Ident { name: 66, ctxt: 0 },
+                Continue => Ident { name: 64, ctxt: 0 },
+
+                Alignof => Ident { name: 69, ctxt: 0 },
+                Be => Ident { name: 65, ctxt: 0 },
+                Offsetof => Ident { name: 70, ctxt: 0 },
+                Pure => Ident { name: 66, ctxt: 0 },
+                Sizeof => Ident { name: 71, ctxt: 0 },
+                Typeof => Ident { name: 68, ctxt: 0 },
+                Yield => Ident { name: 67, ctxt: 0 },
             }
         }
     }
@@ -709,7 +712,7 @@ pub fn is_any_keyword(tok: &Token) -> bool {
 pub fn is_strict_keyword(tok: &Token) -> bool {
     match *tok {
         token::IDENT(sid, false) => match sid.name {
-            8 | 27 | 32 .. 63 => true,
+            8 | 27 | 32 .. 64 => true,
             _ => false,
         },
         _ => false,
@@ -719,7 +722,7 @@ pub fn is_strict_keyword(tok: &Token) -> bool {
 pub fn is_reserved_keyword(tok: &Token) -> bool {
     match *tok {
         token::IDENT(sid, false) => match sid.name {
-            64 .. 70 => true,
+            65 .. 71 => true,
             _ => false,
         },
         _ => false,