diff options
author | Christian <c@ethdev.com> | 2014-12-03 16:41:12 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-03 16:41:12 +0800 |
commit | 7b54d957d8535fb9c9a978246fe3afd90657fae2 (patch) | |
tree | 6562fb7f7990328b8f4f7defab13790aa82d06d6 /Scanner.cpp | |
parent | b685735b3ac267fbcef97cf89b68adba65cf9ff0 (diff) | |
download | dexon-solidity-7b54d957d8535fb9c9a978246fe3afd90657fae2.tar.gz dexon-solidity-7b54d957d8535fb9c9a978246fe3afd90657fae2.tar.zst dexon-solidity-7b54d957d8535fb9c9a978246fe3afd90657fae2.zip |
Comments for the TOKEN_LIST usage.
Diffstat (limited to 'Scanner.cpp')
-rw-r--r-- | Scanner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Scanner.cpp b/Scanner.cpp index 487d5c20..2f5f8d37 100644 --- a/Scanner.cpp +++ b/Scanner.cpp @@ -621,11 +621,11 @@ Token::Value Scanner::scanNumber(char _charSeen) static Token::Value keywordOrIdentifierToken(string const& _input) { + // The following macros are used inside TOKEN_LIST and cause non-keyword tokens to be ignored + // and keywords to be put inside the keywords variable. #define KEYWORD(name, string, precedence) {string, Token::name}, #define TOKEN(name, string, precedence) - static const map<string, Token::Value> keywords{ - TOKEN_LIST(TOKEN, KEYWORD) - }; + static const map<string, Token::Value> keywords({TOKEN_LIST(TOKEN, KEYWORD)}); #undef KEYWORD #undef TOKEN auto it = keywords.find(_input); |