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);
|
tok::type type = getIdentifierCharType(current);
|
||||||
bool isTypeString = (type == STRING);
|
bool isTypeString = (type == STRING);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case UNEXPECTED: break;
|
|
||||||
case STRING: ++i;
|
case STRING: ++i;
|
||||||
case IDENTIFIER: case NUMBER: {
|
case IDENTIFIER: case NUMBER: {
|
||||||
string formedString;
|
string formedString;
|
||||||
@ -43,8 +42,8 @@ vector<tok> lex(const string& in)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
case UNEXPECTED: break;
|
||||||
default: resVal.emplace_back(type, string(1, current));
|
default: resVal.emplace_back(type, string(1, current));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user