Revert "Simplify a if statement in lexer.cpp."
This reverts commit 42796ac54ccac44c8a2033ea39635ba44284c5d7.
This commit is contained in:
parent
c02f8bcc1a
commit
d3d951d843
|
@ -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)) {
|
if ((currentType == tok::STRING) || ((currentType == tok::UNEXPECTED) && ((generated.first == tok::IDENTIFIER) || (generated.first == tok::NUMBER)))) {
|
||||||
generated.second.append(string(1, current));
|
longLex = false;
|
||||||
} else longLex = false;
|
} else generated.second.append(string(1, current));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Test
|
/* Test
|
||||||
|
|
Loading…
Reference in New Issue