diff options
Diffstat (limited to 'src/parse/lex.cpp')
-rw-r--r-- | src/parse/lex.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp index 3c4bd795..a92753d8 100644 --- a/src/parse/lex.cpp +++ b/src/parse/lex.cpp @@ -747,20 +747,13 @@ Token Lexer::getTokenInt_Identifier(Codepoint leader, Codepoint leader2) ch = this->getc(); } - if( ch == '!' ) - { - return Token(TOK_MACRO, str); - } - else + this->ungetc(); + for( unsigned int i = 0; i < LEN(RWORDS); i ++ ) { - this->ungetc(); - for( unsigned int i = 0; i < LEN(RWORDS); i ++ ) - { - if( str < RWORDS[i].chars ) break; - if( str == RWORDS[i].chars ) return Token((enum eTokenType)RWORDS[i].type); - } - return Token(TOK_IDENT, mv$(str)); + if( str < RWORDS[i].chars ) break; + if( str == RWORDS[i].chars ) return Token((enum eTokenType)RWORDS[i].type); } + return Token(TOK_IDENT, mv$(str)); } // Takes the VERY lazy way of reading the float into a string then passing to strtod |