mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Comments for the TOKEN_LIST usage.
This commit is contained in:
parent
b685735b3a
commit
7b54d957d8
@ -621,11 +621,11 @@ Token::Value Scanner::scanNumber(char _charSeen)
|
|||||||
|
|
||||||
static Token::Value keywordOrIdentifierToken(string const& _input)
|
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 KEYWORD(name, string, precedence) {string, Token::name},
|
||||||
#define TOKEN(name, string, precedence)
|
#define TOKEN(name, string, precedence)
|
||||||
static const map<string, Token::Value> keywords{
|
static const map<string, Token::Value> keywords({TOKEN_LIST(TOKEN, KEYWORD)});
|
||||||
TOKEN_LIST(TOKEN, KEYWORD)
|
|
||||||
};
|
|
||||||
#undef KEYWORD
|
#undef KEYWORD
|
||||||
#undef TOKEN
|
#undef TOKEN
|
||||||
auto it = keywords.find(_input);
|
auto it = keywords.find(_input);
|
||||||
|
Loading…
Reference in New Issue
Block a user