[ELF] Simplify ScriptLexer::consume. NFC

This commit is contained in:
Fangrui Song
2024-07-20 14:23:54 -07:00
parent a23efcc703
commit c93554b82a

View File

@@ -282,10 +282,9 @@ StringRef ScriptLexer::peek2() {
}
bool ScriptLexer::consume(StringRef tok) {
if (peek() == tok) {
skip();
if (next() == tok)
return true;
}
--pos;
return false;
}