Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Conversation

@avian2
Copy link

@avian2 avian2 commented Mar 25, 2017

This change removes the possibility of using tuple literals in the beginning of a conjuction conditional. This fixes issue #8.

For example, consider this valid conditional:

Applejack has more than one and Pinkie Pie has more than one

Without this change, one and Pinkie Pie will be parsed as a tuple literal, which then causes the parser to fail on the has keyword. The syntax itself doesn't seem ambiguous in this particular case. However, the parser only fails at the andCondition, so it won't try to reparse one as a simpleExpression instead of a listExpression.

It might be possible to fix the parser to correctly parse this while retaining the possibility of having tuple literals. Removing literals seems simpler though.

This change removes the possibility of using tuple literals in the first part
of the conjuction conditional. This removes the ambiguity in the syntax.

For example, consider this valid conditional:

"Applejack has more than one and Pinkie Pie has more than one"

Without this change, "one and Pinkie Pie" will be parsed as a tuple literal,
which then causes the parser to fail on the "has" keyword.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant