[DEV] add simple string quote
This commit is contained in:
parent
5a0f85a781
commit
31cb2e90cc
@ -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));
|
||||
|
@ -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 "==";
|
||||
|
@ -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 "="
|
||||
|
Loading…
Reference in New Issue
Block a user