add more parses and fix minor memory leak

This commit is contained in:
2025-05-31 20:03:06 +01:00
parent d18ff96f8f
commit a614eab8fc
16 changed files with 188 additions and 50 deletions

View File

@@ -18,6 +18,16 @@ int yywrap(void *) {
"," {return TOKEN_COMMA; }
":" {return TOKEN_COLON; }
"=" { return TOKEN_ASSIGN; }
"+=" { return TOKEN_ASSIGN_PLUS; }
"-=" { return TOKEN_ASSIGN_MINUS; }
"//=" { return TOKEN_ASSIGN_FLOORDIV; }
"/=" { return TOKEN_ASSIGN_SLASH; }
"%=" { return TOKEN_ASSIGN_MODULO; }
"*=" { return TOKEN_ASSIGN_STAR; }
"^=" { return TOKEN_ASSIGN_CARET; }
"not"[ \t]+"in" { return TOKEN_NOT_IN; }
"&&" { return TOKEN_AND; }
"||" { return TOKEN_OR; }
@@ -25,7 +35,6 @@ int yywrap(void *) {
">=" { return TOKEN_GE; }
"!=" { return TOKEN_NE; }
"==" { return TOKEN_EQ; }
"=" { return TOKEN_ASSIGN; }
"//" { return TOKEN_FLOORDIV; }
"<" { return TOKEN_LT; }
">" { return TOKEN_GT; }