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

move validation of LHS of := from evaluator to parser #150

Merged
merged 1 commit into from
Feb 15, 2018
Merged

Conversation

andrew-coleman
Copy link
Member

The left hand side of the binding operator := must be a variable. This PR moves the validation of this rule from the evaluator (which throws a dynamic error) to the parser (throws a syntax error). This is also more robust since it is checking against the token type rather than a node in the AST.

Resolves #148 which was ignoring the predicate attached to the variable in the AST.

@coveralls
Copy link

coveralls commented Feb 15, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 48afecd on bind into 247e94d on master.

@mattbaileyuk mattbaileyuk merged commit 7b225bf into master Feb 15, 2018
@mattbaileyuk mattbaileyuk deleted the bind branch February 15, 2018 15:49
mtiller added a commit to mtiller/jsonata that referenced this pull request Mar 7, 2018
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.

3 participants