about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorKeegan McAllister <kmcallister@mozilla.com>2015-01-02 13:39:05 -0800
committerKeegan McAllister <kmcallister@mozilla.com>2015-01-05 18:21:14 -0800
commitc9f0ff3813a662197e262e64edb8302d2b4a3e75 (patch)
tree0533a040160c8def11c60c883bf9fcfea63399b3 /src/libsyntax/parse
parentaa69cbde8279cd90457454c3b3f40a36e8a79dff (diff)
downloadrust-c9f0ff3813a662197e262e64edb8302d2b4a3e75.tar.gz
rust-c9f0ff3813a662197e262e64edb8302d2b4a3e75.zip
Reserve the keyword 'macro'
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
-rw-r--r--src/libsyntax/parse/token.rs1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5539abb16b4..24011df7acb 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3881,13 +3881,13 @@ impl<'a> Parser<'a> {
                                                                   &mut stmts,
                                                                   &mut expr);
                         }
-                        StmtMac(macro, MacStmtWithoutBraces) => {
+                        StmtMac(mac, MacStmtWithoutBraces) => {
                             // statement macro without braces; might be an
                             // expr depending on whether a semicolon follows
                             match self.token {
                                 token::Semi => {
                                     stmts.push(P(Spanned {
-                                        node: StmtMac(macro,
+                                        node: StmtMac(mac,
                                                       MacStmtWithSemicolon),
                                         span: span,
                                     }));
@@ -3896,7 +3896,7 @@ impl<'a> Parser<'a> {
                                 _ => {
                                     let e = self.mk_mac_expr(span.lo,
                                                              span.hi,
-                                                             macro.and_then(|m| m.node));
+                                                             mac.and_then(|m| m.node));
                                     let e =
                                         self.parse_dot_or_call_expr_with(e);
                                     self.handle_expression_like_statement(
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index a653190cffd..094aacf3207 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -574,6 +574,7 @@ declare_special_idents_and_keywords! {
         (56,                         Abstract,   "abstract");
         (57,                         Final,      "final");
         (58,                         Override,   "override");
+        (59,                         Macro,      "macro");
     }
 }