about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-06-25 20:34:49 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-06-29 15:19:52 +0300
commite03948ef3e19ff90066ca366bf76c390d7a42bc5 (patch)
treedcbabd39f56a901eeb0f9758b887bc398c9b6c2e /src/libsyntax_pos
parent7acce3724d6ba5cb84d6eef6d6847f8573a1fe5a (diff)
downloadrust-e03948ef3e19ff90066ca366bf76c390d7a42bc5.tar.gz
rust-e03948ef3e19ff90066ca366bf76c390d7a42bc5.zip
Make `$crate` a keyword
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/symbol.rs103
1 files changed, 52 insertions, 51 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 6b5caff27e8..5e2e448f741 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -250,63 +250,64 @@ declare_keywords! {
     (4,  Const,          "const")
     (5,  Continue,       "continue")
     (6,  Crate,          "crate")
-    (7,  Else,           "else")
-    (8,  Enum,           "enum")
-    (9,  Extern,         "extern")
-    (10, False,          "false")
-    (11, Fn,             "fn")
-    (12, For,            "for")
-    (13, If,             "if")
-    (14, Impl,           "impl")
-    (15, In,             "in")
-    (16, Let,            "let")
-    (17, Loop,           "loop")
-    (18, Match,          "match")
-    (19, Mod,            "mod")
-    (20, Move,           "move")
-    (21, Mut,            "mut")
-    (22, Pub,            "pub")
-    (23, Ref,            "ref")
-    (24, Return,         "return")
-    (25, SelfValue,      "self")
-    (26, SelfType,       "Self")
-    (27, Static,         "static")
-    (28, Struct,         "struct")
-    (29, Super,          "super")
-    (30, Trait,          "trait")
-    (31, True,           "true")
-    (32, Type,           "type")
-    (33, Unsafe,         "unsafe")
-    (34, Use,            "use")
-    (35, Where,          "where")
-    (36, While,          "while")
+    (7,  DollarCrate,    "$crate")
+    (8,  Else,           "else")
+    (9,  Enum,           "enum")
+    (10, Extern,         "extern")
+    (11, False,          "false")
+    (12, Fn,             "fn")
+    (13, For,            "for")
+    (14, If,             "if")
+    (15, Impl,           "impl")
+    (16, In,             "in")
+    (17, Let,            "let")
+    (18, Loop,           "loop")
+    (19, Match,          "match")
+    (20, Mod,            "mod")
+    (21, Move,           "move")
+    (22, Mut,            "mut")
+    (23, Pub,            "pub")
+    (24, Ref,            "ref")
+    (25, Return,         "return")
+    (26, SelfValue,      "self")
+    (27, SelfType,       "Self")
+    (28, Static,         "static")
+    (29, Struct,         "struct")
+    (30, Super,          "super")
+    (31, Trait,          "trait")
+    (32, True,           "true")
+    (33, Type,           "type")
+    (34, Unsafe,         "unsafe")
+    (35, Use,            "use")
+    (36, Where,          "where")
+    (37, While,          "while")
 
     // Keywords reserved for future use.
-    (37, Abstract,       "abstract")
-    (38, Alignof,        "alignof")
-    (39, Become,         "become")
-    (40, Do,             "do")
-    (41, Final,          "final")
-    (42, Macro,          "macro")
-    (43, Offsetof,       "offsetof")
-    (44, Override,       "override")
-    (45, Priv,           "priv")
-    (46, Proc,           "proc")
-    (47, Pure,           "pure")
-    (48, Sizeof,         "sizeof")
-    (49, Typeof,         "typeof")
-    (50, Unsized,        "unsized")
-    (51, Virtual,        "virtual")
-    (52, Yield,          "yield")
+    (38, Abstract,       "abstract")
+    (39, Alignof,        "alignof")
+    (40, Become,         "become")
+    (41, Do,             "do")
+    (42, Final,          "final")
+    (43, Macro,          "macro")
+    (44, Offsetof,       "offsetof")
+    (45, Override,       "override")
+    (46, Priv,           "priv")
+    (47, Proc,           "proc")
+    (48, Pure,           "pure")
+    (49, Sizeof,         "sizeof")
+    (50, Typeof,         "typeof")
+    (51, Unsized,        "unsized")
+    (52, Virtual,        "virtual")
+    (53, Yield,          "yield")
 
     // Weak keywords, have special meaning only in specific contexts.
-    (53, Default,        "default")
-    (54, StaticLifetime, "'static")
-    (55, Union,          "union")
-    (56, Catch,          "catch")
+    (54, Default,        "default")
+    (55, StaticLifetime, "'static")
+    (56, Union,          "union")
+    (57, Catch,          "catch")
 
     // A virtual keyword that resolves to the crate root when used in a lexical scope.
-    (57, CrateRoot, "{{root}}")
+    (58, CrateRoot,      "{{root}}")
 }
 
 // If an interner exists in TLS, return it. Otherwise, prepare a fresh one.