about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-03-15 23:01:24 -0700
committerbors <bors@rust-lang.org>2014-03-15 23:01:24 -0700
commitf6fcdbb68718380beca798d087c46152cad0949c (patch)
treec6b7fd10bb869fba19561852cf4eb286b0f96a4f /src/libsyntax/parse
parentabd844e4df068196d1150ac39d596f73e210d95d (diff)
parent0015cab1fd7b4b47030c808a825bb5594cc1d4ac (diff)
downloadrust-f6fcdbb68718380beca798d087c46152cad0949c.tar.gz
rust-f6fcdbb68718380beca798d087c46152cad0949c.zip
auto merge of #12791 : alexcrichton/rust/liblog, r=brson
The rationale and modifications can be found in the first commit message.

This does make logging a bit more painful to use initially because it involves a feature gate and some `phase` attributes, but I think it may be reasonable to not require the `phase` attribute for loading `macro_rules!` macros because defining them will still be gated.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs8
-rw-r--r--src/libsyntax/parse/token.rs59
2 files changed, 30 insertions, 37 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 040c4da6885..f52effb8c81 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -25,7 +25,7 @@ use ast::{Expr, Expr_, ExprAddrOf, ExprMatch, ExprAgain};
 use ast::{ExprAssign, ExprAssignOp, ExprBinary, ExprBlock, ExprBox};
 use ast::{ExprBreak, ExprCall, ExprCast};
 use ast::{ExprField, ExprFnBlock, ExprIf, ExprIndex};
-use ast::{ExprLit, ExprLogLevel, ExprLoop, ExprMac};
+use ast::{ExprLit, ExprLoop, ExprMac};
 use ast::{ExprMethodCall, ExprParen, ExprPath, ExprProc};
 use ast::{ExprRepeat, ExprRet, ExprStruct, ExprTup, ExprUnary};
 use ast::{ExprVec, ExprVstore, ExprVstoreSlice};
@@ -1886,12 +1886,6 @@ impl Parser {
                 }
             }
             hi = self.last_span.hi;
-        } else if self.eat_keyword(keywords::__LogLevel) {
-            // LOG LEVEL expression
-            self.expect(&token::LPAREN);
-            ex = ExprLogLevel;
-            hi = self.span.hi;
-            self.expect(&token::RPAREN);
         } else if self.eat_keyword(keywords::Return) {
             // RETURN expression
             if can_begin_expr(&self.token) {
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index cd52ff4b0ac..efadea16fe2 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -462,41 +462,40 @@ declare_special_idents_and_keywords! {
         (20,                         Impl,       "impl");
         (21,                         In,         "in");
         (22,                         Let,        "let");
-        (23,                         __LogLevel, "__log_level");
-        (24,                         Loop,       "loop");
-        (25,                         Match,      "match");
-        (26,                         Mod,        "mod");
-        (27,                         Mut,        "mut");
-        (28,                         Once,       "once");
-        (29,                         Priv,       "priv");
-        (30,                         Pub,        "pub");
-        (31,                         Ref,        "ref");
-        (32,                         Return,     "return");
+        (23,                         Loop,       "loop");
+        (24,                         Match,      "match");
+        (25,                         Mod,        "mod");
+        (26,                         Mut,        "mut");
+        (27,                         Once,       "once");
+        (28,                         Priv,       "priv");
+        (29,                         Pub,        "pub");
+        (30,                         Ref,        "ref");
+        (31,                         Return,     "return");
         // Static and Self are also special idents (prefill de-dupes)
         (super::STATIC_KEYWORD_NAME, Static,     "static");
         (super::SELF_KEYWORD_NAME,   Self,       "self");
-        (33,                         Struct,     "struct");
-        (34,                         Super,      "super");
-        (35,                         True,       "true");
-        (36,                         Trait,      "trait");
-        (37,                         Type,       "type");
-        (38,                         Unsafe,     "unsafe");
-        (39,                         Use,        "use");
-        (40,                         While,      "while");
-        (41,                         Continue,   "continue");
-        (42,                         Proc,       "proc");
-        (43,                         Box,        "box");
+        (32,                         Struct,     "struct");
+        (33,                         Super,      "super");
+        (34,                         True,       "true");
+        (35,                         Trait,      "trait");
+        (36,                         Type,       "type");
+        (37,                         Unsafe,     "unsafe");
+        (38,                         Use,        "use");
+        (39,                         While,      "while");
+        (40,                         Continue,   "continue");
+        (41,                         Proc,       "proc");
+        (42,                         Box,        "box");
 
         'reserved:
-        (44,                         Alignof,    "alignof");
-        (45,                         Be,         "be");
-        (46,                         Offsetof,   "offsetof");
-        (47,                         Pure,       "pure");
-        (48,                         Sizeof,     "sizeof");
-        (49,                         Typeof,     "typeof");
-        (50,                         Unsized,    "unsized");
-        (51,                         Yield,      "yield");
-        (52,                         Do,         "do");
+        (43,                         Alignof,    "alignof");
+        (44,                         Be,         "be");
+        (45,                         Offsetof,   "offsetof");
+        (46,                         Pure,       "pure");
+        (47,                         Sizeof,     "sizeof");
+        (48,                         Typeof,     "typeof");
+        (49,                         Unsized,    "unsized");
+        (50,                         Yield,      "yield");
+        (51,                         Do,         "do");
     }
 }