Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESI conditions #160

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

ESI conditions #160

wants to merge 2 commits into from

Conversation

hamishforbes
Copy link
Collaborator

Creating a PR for this because I think some of these behaviours are wrong.

The ESI spec says...

Logical operators ("&", "|", "!") can be used to qualify expressions, but cannot be used as comparitors themselves.
For example, the following expressions are correct:

!(1==1)
!('a'<='c')
(1==1)|('abc'=='def')
(4!=5)&(4==5)

while these will not evaluate:

(1 & 4)
("abc" | "edf")

The condition_lexer will allow those second type of conditions and parse them to Lua.

evaluate_condition also returns non-boolean values for some conditions which seems wrong?

Also some conditions that pass through the lexer result in errors in the evaluator because they are invalid Lua. We should probably try and catch these too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant