You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2021. It is now read-only.
57 ## $
50 ## edit
w ##
4 ## ==
25 ## =
... The error message
Assumption
I guess the lexer sees the valid "==" token and accepts it before finding an also valid "===". Perhaps this is because of an wrong order in tools/lexer/expression_lexer.plex as shown below:
Reproduce
(This is a copy of http://bugs.invenzzia.org/task/178 )
Create an expression containing a "===" e.g. in an opt:if condition (like in my case) and compile it. (The bug also applies to "!=" and "!==")
Result
The compiler struggles interpreting "===" and raises the following exception:
adding the following PHP code in Opt/Expression/Standard.php on line 172 (in the while loop) I get the output following afterwards.
Standard.php, line 172:
debug output:
Assumption
I guess the lexer sees the valid "==" token and accepts it before finding an also valid "===". Perhaps this is because of an wrong order in tools/lexer/expression_lexer.plex as shown below:
expression_lexer.plex:
Workaround
According to http://static.invenzzia.org/docs/opt/2_0/book/en/syntax.expressions.operators.html , you can replace "===" with "eqt", "!=" with "neq" and "!==" with "neqt"
The text was updated successfully, but these errors were encountered: