1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:18:12 +00:00

JSSpecCompiler: Make function arguments parsing much simpler

In a nutshell, when we understand that the expression is a function
call (this happens at '(' after an expression), stop parsing expression
and start parsing function arguments. This makes
`FunctionCallCanonicalizationPass` and the workaround for zero argument
function calls obsolete.
This commit is contained in:
Dan Klishch 2024-01-21 13:51:05 -05:00 committed by Andrew Kaster
parent 990e30f458
commit d14bb7e91e
10 changed files with 37 additions and 114 deletions

View file

@ -33,7 +33,6 @@ constexpr i32 closing_bracket_precedence = 18;
F(Enumerator, -1, Invalid, Invalid, Invalid, "enumerator") \
F(Equals, 10, Invalid, CompareEqual, Invalid, "equals") \
F(ExclamationMark, 3, AssertCompletion, Invalid, Invalid, "exclamation mark") \
F(FunctionCall, 2, Invalid, FunctionCall, Invalid, "function call token") \
F(Greater, 9, Invalid, CompareGreater, Invalid, "greater than") \
F(Identifier, -1, Invalid, Invalid, Invalid, "identifier") \
F(Is, -1, Invalid, Invalid, Invalid, "operator is") \