diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-13 12:34:13 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-13 12:34:13 +0800 |
commit | 1e77e4894c4355272de8d0bfe391a29d44608604 (patch) | |
tree | 7d9db2ba449c296e16d6b27ff2e19f5c3ad40cd3 /src/parse/common.hpp | |
parent | 06e7e28cd4de3871f55255150b66821b12365881 (diff) | |
download | mrust-1e77e4894c4355272de8d0bfe391a29d44608604.tar.gz |
Const items in expressions, attributes in impl blocks
Diffstat (limited to 'src/parse/common.hpp')
-rw-r--r-- | src/parse/common.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/parse/common.hpp b/src/parse/common.hpp index 38ef3c96..ff72920c 100644 --- a/src/parse/common.hpp +++ b/src/parse/common.hpp @@ -4,12 +4,16 @@ #define GET_TOK(tok, lex) ((tok = lex.getToken()).type())
#define GET_CHECK_TOK(tok, lex, exp) do {\
- if((tok = lex.getToken()).type() != exp) \
- throw ParseError::Unexpected(lex, tok, Token(exp));\
+ if((tok = lex.getToken()).type() != exp) { \
+ DEBUG("GET_CHECK_TOK " << __FILE__ << ":" << __LINE__); \
+ throw ParseError::Unexpected(lex, tok, Token(exp));\
+ }\
} while(0)
#define CHECK_TOK(tok, exp) do {\
- if(tok.type() != exp) \
- throw ParseError::Unexpected(lex, tok, Token(exp));\
+ if(tok.type() != exp) { \
+ DEBUG("CHECK_TOK " << __FILE__ << ":" << __LINE__); \
+ throw ParseError::Unexpected(lex, tok, Token(exp));\
+ } \
} while(0)
enum eParsePathGenericMode
|