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

Can we have predicates? #55

Open
nilslindemann opened this issue Nov 21, 2021 · 1 comment
Open

Can we have predicates? #55

nilslindemann opened this issue Nov 21, 2021 · 1 comment

Comments

@nilslindemann
Copy link

nilslindemann commented Nov 21, 2021

I love these. They are useful to parse, for example, indentation based languages.

In Peggy.js these are the &{...} and &(...) syntaxes.

Nice project, your docs are great.

@jcoglan
Copy link
Owner

jcoglan commented Mar 31, 2022

I don't see a reason on paper why this couldn't happen, the main challenge is deciding which bits of state to expose to such functions, and how they transfer state between each other, without tightly coupling the implementation.

Also these would need to be written using named references rather than inline code, in order to support multiple languages as we do for our node-building actions.

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

No branches or pull requests

2 participants