canopy
canopy copied to clipboard
Can we have predicates?
trafficstars
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.
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.