diff --git a/estyle/lexer/Lexer.cpp b/estyle/lexer/Lexer.cpp index 78e2b2b..5d451fe 100644 --- a/estyle/lexer/Lexer.cpp +++ b/estyle/lexer/Lexer.cpp @@ -331,7 +331,6 @@ void estyle::Lexer::parse() { getChar(iii, currentChar, nextChar); continue; } - /* if (currentChar == '\'') { // strings... iii++; @@ -352,12 +351,11 @@ void estyle::Lexer::parse() { if (currentChar == 0) { ESTYLE_ERROR("Arrive at the end of file without '\'' element in string parsing"); } - m_list.pushBack(estyle::LexerElement(estyle::lexer::STRING, tokenStart, iii)); + m_list.pushBack(estyle::LexerElement(estyle::lexer::SIMPLE_QUOTE_STRING, tokenStart, iii)); iii++; getChar(iii, currentChar, nextChar); continue; } - */ if (currentChar == '=') { if (nextChar == '=') { m_list.pushBack(estyle::LexerElement(estyle::lexer::EQUAL_EQUAL, iii, iii+2)); diff --git a/estyle/lexer/tocken.cpp b/estyle/lexer/tocken.cpp index 4002fcd..4793a1e 100644 --- a/estyle/lexer/tocken.cpp +++ b/estyle/lexer/tocken.cpp @@ -17,7 +17,8 @@ etk::String estyle::lexer::toString(estyle::lexer::tocken _token) { case estyle::lexer::ID: return "ID"; case estyle::lexer::INTEGER: return "INTEGER value"; case estyle::lexer::FLOAT: return "FLOAT value"; - case estyle::lexer::STRING: return "STRING value"; + case estyle::lexer::STRING: return "STRING \"\" value"; + case estyle::lexer::SIMPLE_QUOTE_STRING: return "STRING '' value"; case estyle::lexer::BOOLEAN: return "BOOLEAN value"; case estyle::lexer::EQUAL: return "="; case estyle::lexer::EQUAL_EQUAL: return "=="; diff --git a/estyle/lexer/tocken.hpp b/estyle/lexer/tocken.hpp index 8d214ca..04ca897 100644 --- a/estyle/lexer/tocken.hpp +++ b/estyle/lexer/tocken.hpp @@ -16,7 +16,8 @@ namespace estyle { ID = 256, INTEGER, //!< integer number FLOAT, //!< Floating point number - STRING, //!< string element + STRING, //!< string element "" + SIMPLE_QUOTE_STRING, //!< string element '' BOOLEAN, //!< string element EQUAL, //!< element "="