Add the [[unlikely]] attribute to the '\r' case in lexer.cpp
This commit is contained in:
parent
6de05633d9
commit
84b9f9de73
|
@ -23,7 +23,7 @@ vector<tok> lex(const string& in, const char separatorCharacter)
|
||||||
case DOT: case DOLLAR_SIGN: case SQUOTE:
|
case DOT: case DOLLAR_SIGN: case SQUOTE:
|
||||||
resVal.emplace_back(static_cast<tok::type>(current), string(1, current), lineNumber); break;
|
resVal.emplace_back(static_cast<tok::type>(current), string(1, current), lineNumber); break;
|
||||||
[[likely]] case '\n': ++lineNumber; case ';': resVal.emplace_back(SEPARATOR, string(1, separatorCharacter), lineNumber);
|
[[likely]] case '\n': ++lineNumber; case ';': resVal.emplace_back(SEPARATOR, string(1, separatorCharacter), lineNumber);
|
||||||
[[likely]] case ' ': case '\t': case '\r': break;
|
[[likely]] case ' ': case '\t': [[unlikely]] case '\r': break;
|
||||||
default: {
|
default: {
|
||||||
tok::type type = getIdentifierCharType(current);
|
tok::type type = getIdentifierCharType(current);
|
||||||
bool isTypeString = (type == STRING);
|
bool isTypeString = (type == STRING);
|
||||||
|
|
Loading…
Reference in New Issue