Simplify a if statement in lexer.cpp.
This commit is contained in:
parent
11b92f7346
commit
c02f8bcc1a
|
@ -63,9 +63,9 @@ vector<tok>& lex(const string& in)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tok::type currentType = getIdentifierCharType(current);
|
tok::type currentType = getIdentifierCharType(current);
|
||||||
if ((currentType == tok::STRING) || ((currentType == tok::UNEXPECTED) && ((generated.first == tok::IDENTIFIER) || (generated.first == tok::NUMBER)))) {
|
if ((currentType == tok::STRING) || (currentType == tok::UNEXPECTED)) {
|
||||||
longLex = false;
|
generated.second.append(string(1, current));
|
||||||
} else generated.second.append(string(1, current));
|
} else longLex = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Test
|
/* Test
|
||||||
|
|
Loading…
Reference in New Issue