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

Give up and introduce circumfix and postcircumfix operators #434

Open
masak opened this issue Nov 17, 2018 · 0 comments
Open

Give up and introduce circumfix and postcircumfix operators #434

masak opened this issue Nov 17, 2018 · 0 comments

Comments

@masak
Copy link
Owner

masak commented Nov 17, 2018

This will probably be necessary in #430, but it's been a long time coming.

  • We've talked many times about having a Qtype for expression parentheses. It's not necessary for "regular" uses of expressions — since the Qtree layout captures all of that information anyway — but it shows up in basically any non-standard treatment of parentheses. This new construct could be a term, but it feels much closer to the truth to make it a circumfix.

  • Array and dict literals could also be a circumfix, with their own special expression-like environment (Allow operators to be defined in other, "expression-like" rules #430).

  • Call syntax and indexing syntax could be postcircumfixes, again with their own special expression-like environment.

Basically it feels like this change would pull a few things out of is parsed handling and into the declarative. As an extra bonus, we end up closer to Perl 6's model.

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

No branches or pull requests

1 participant