fix: properly lex new token and adjust parsed spans

This commit is contained in:
rvcas
2023-02-15 12:56:52 -05:00
committed by Lucas
parent e647330433
commit a88a193383
4 changed files with 66 additions and 16 deletions

View File

@@ -102,6 +102,7 @@ pub fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = ParseError> {
"todo" => Token::Todo,
"type" => Token::Type,
"when" => Token::When,
"validator" => Token::Validator,
_ => {
if s.chars().next().map_or(false, |c| c.is_uppercase()) {
Token::UpName {