summaryrefslogtreecommitdiff
path: root/src/parse/expr.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-05-22 22:39:37 +0800
committerJohn Hodge <tpg@mutabah.net>2015-05-22 22:39:37 +0800
commit3a4d71443bfcdbba1d14c3d6c7088eaf24e479b8 (patch)
tree8416dac5875cbcc637417b35483224dcc8535351 /src/parse/expr.cpp
parent71f33986378cbf01ea33490a095244a28a907f15 (diff)
downloadmrust-3a4d71443bfcdbba1d14c3d6c7088eaf24e479b8.tar.gz
Restructure macro expansion to correctly fit rustc's model
Diffstat (limited to 'src/parse/expr.cpp')
-rw-r--r--src/parse/expr.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp
index b9a3d003..12aa3d3a 100644
--- a/src/parse/expr.cpp
+++ b/src/parse/expr.cpp
@@ -640,6 +640,7 @@ bool Parse_IsTokValue(eTokenType tok_type)
case TOK_MACRO:
+ case TOK_PIPE:
case TOK_EXCLAM:
case TOK_DASH:
case TOK_STAR:
@@ -1297,3 +1298,11 @@ TokenTree Parse_TT_Block(TokenStream& lex)
throw ParseError::Todo("Parse_TT_Block");
}
+TokenTree Parse_TT_Meta(TokenStream& lex)
+{
+ TRACE_FUNCTION;
+ TTLexer wlex(lex);
+ SET_PARSE_FLAG(wlex, no_expand_macros);
+ Parse_MetaItem(wlex);
+ return wlex.get_output();
+}