about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-08-27 23:12:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-05 01:48:20 -0700
commit8a966183fe5129ea2a55a9898ac1bd0f16f3573d (patch)
tree8e222f4e505499610a935accf49b73e5ee8e2a89 /src/libsyntax/parse/parser.rs
parent3c3ae1d0e26c9ae0906dc57daa14bb9e4627e3c8 (diff)
downloadrust-8a966183fe5129ea2a55a9898ac1bd0f16f3573d.tar.gz
rust-8a966183fe5129ea2a55a9898ac1bd0f16f3573d.zip
Remove the __log function for __log_level
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.

Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 51c5522ae2f..7afd9c8bf23 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -26,7 +26,7 @@ use ast::{Expr, Expr_, ExprAddrOf, ExprMatch, ExprAgain};
 use ast::{ExprAssign, ExprAssignOp, ExprBinary, ExprBlock};
 use ast::{ExprBreak, ExprCall, ExprCast, ExprDoBody};
 use ast::{ExprField, ExprFnBlock, ExprIf, ExprIndex};
-use ast::{ExprLit, ExprLog, ExprLoop, ExprMac};
+use ast::{ExprLit, ExprLogLevel, ExprLoop, ExprMac};
 use ast::{ExprMethodCall, ExprParen, ExprPath, ExprRepeat};
 use ast::{ExprRet, ExprSelf, ExprStruct, ExprTup, ExprUnary};
 use ast::{ExprVec, ExprVstore, ExprVstoreMutBox};
@@ -1827,13 +1827,10 @@ impl Parser {
                 }
             }
             hi = self.last_span.hi;
-        } else if self.eat_keyword(keywords::__Log) {
-            // LOG expression
+        } else if self.eat_keyword(keywords::__LogLevel) {
+            // LOG LEVEL expression
             self.expect(&token::LPAREN);
-            let lvl = self.parse_expr();
-            self.expect(&token::COMMA);
-            let e = self.parse_expr();
-            ex = ExprLog(lvl, e);
+            ex = ExprLogLevel;
             hi = self.span.hi;
             self.expect(&token::RPAREN);
         } else if self.eat_keyword(keywords::Return) {