lang: parser: Lexer should allow in keyword as a variable name

We move it downwards to allow this case. Whether we want to allow this
long-term or not is to be decided.
This commit is contained in:
James Shubin
2023-11-04 14:35:24 -04:00
parent 96093984e4
commit 233625db20
2 changed files with 21 additions and 5 deletions

View File

@@ -139,11 +139,6 @@
lval.str = yylex.Text()
return NOT
}
/in/ {
yylex.pos(lval) // our pos
lval.str = yylex.Text()
return IN
}
/\->/ {
yylex.pos(lval) // our pos
lval.str = yylex.Text()
@@ -306,6 +301,11 @@
lval.str = yylex.Text()
return IDENTIFIER
}
/in/ {
yylex.pos(lval) // our pos
lval.str = yylex.Text()
return IN
}
/[A-Z]([a-z0-9_]*[a-z0-9]+)?/
{
yylex.pos(lval) // our pos