From: Daniel Karbach Date: Sun, 26 Aug 2012 15:04:21 +0000 (+0200) Subject: added missing parentheses tokens X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=d1bfdd8fcb19f27d63400109810de168d0a8ab1a;p=l2e.git added missing parentheses tokens --- diff --git a/src/loader/Tokenizer.cpp b/src/loader/Tokenizer.cpp index 2b87d9c..828f6ed 100644 --- a/src/loader/Tokenizer.cpp +++ b/src/loader/Tokenizer.cpp @@ -46,6 +46,8 @@ Tokenizer::Token Tokenizer::ReadToken() { case Token::COMMA: case Token::BRACKET_OPEN: case Token::BRACKET_CLOSE: + case Token::PARENTHESIS_OPEN: + case Token::PARENTHESIS_CLOSE: return Token ((Token::Type) c); case '+': case '-': case '0': case '1': case '2': case '3': case '4': diff --git a/src/loader/Tokenizer.h b/src/loader/Tokenizer.h index f2ab4aa..80a3169 100644 --- a/src/loader/Tokenizer.h +++ b/src/loader/Tokenizer.h @@ -37,6 +37,8 @@ public: COMMA = ',', BRACKET_OPEN = '[', BRACKET_CLOSE = ']', + PARENTHESIS_OPEN = '(', + PARENTHESIS_CLOSE = ')', NUMBER, STRING, KEYWORD_EXPORT, @@ -99,6 +101,10 @@ inline const char *TokenTypeToString(Tokenizer::Token::Type t) { return "BRACKET_OPEN"; case Tokenizer::Token::BRACKET_CLOSE: return "BRACKET_CLOSE"; + case Tokenizer::Token::PARENTHESIS_OPEN: + return "PARENTHESIS_OPEN"; + case Tokenizer::Token::PARENTHESIS_CLOSE: + return "PARENTHESIS_CLOSE"; case Tokenizer::Token::NUMBER: return "NUMBER"; case Tokenizer::Token::STRING: