Move the UNEXPECTED case in lexer.cpp
This commit is contained in:
parent
f4297fe851
commit
e8916cf40f
@ -27,7 +27,6 @@ vector<tok> lex(const string& in)
|
||||
tok::type type = getIdentifierCharType(current);
|
||||
bool isTypeString = (type == STRING);
|
||||
switch (type) {
|
||||
case UNEXPECTED: break;
|
||||
case STRING: ++i;
|
||||
case IDENTIFIER: case NUMBER: {
|
||||
string formedString;
|
||||
@ -43,8 +42,8 @@ vector<tok> lex(const string& in)
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case UNEXPECTED: break;
|
||||
default: resVal.emplace_back(type, string(1, current));
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user