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
from
Open

ESI conditions #160

wants to merge 2 commits into from

Conversation

@hamishforbes
Copy link
Collaborator

@hamishforbes hamishforbes commented Sep 5, 2017

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.

@hamishforbes hamishforbes requested a review from pintsized Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.