-
Notifications
You must be signed in to change notification settings - Fork 4
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
Proposal for Conditional Expressions #2
Conversation
Initial draft
Thanks, @michaelhkay, for the proposal, which I’ve discovered a bit too late (just after committing my own version, #7). Talking about the grammar…
Talking about the Elvis operator…
|
+1 for this proposal I agree about the placement in the grammar. In terms of usage, |
That’s a good argument for sticking with |
If we use |
If you have a lexer that tokenizes
This is solvable, as the token is unambiguous in this context as an optional indicator ( |
I think it would be prudent for us to attempt to pick up the grammar machinery used by the WG to verify that our proposed extensions work. Any volunteers? Perhaps we can rope in Michael Dyck who in the latter years was grammar-meister on the WG? |
Perhaps the ":" in a tuple type should be replaced by "as"? |
At the moment this will not cause a conflict in the lexer. I noticed it in my plugin as I have support for the various XQuery syntax extensions and vendor extensions with tests for compact whitespace. I would be in favour of having a way to verify the proposals w.r.t. the grammar. Regarding using |
JSONiq has a Then how would |
@benibela: Thanks for the hint. As far as I remember, there were some other discrepancies between the grammars of JSONiq and XQuery 3.1. I’m wondering if it’s possible at all to support both grammars at the same time? |
The biggest issue is that jsoniq's |
Closed; see qt4cg/qtspecs#171 and qt4cg/qtspecs#170 |
Initial draft