Move the UNEXPECTED case in lexer.cpp

This commit is contained in:
Username404 2021-08-10 14:55:28 +02:00
parent f4297fe851
commit e8916cf40f
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -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;