canopy icon indicating copy to clipboard operation
canopy copied to clipboard

Can we have predicates?

Open nilslindemann opened this issue 4 years ago • 1 comments
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.

nilslindemann avatar Nov 21 '21 23:11 nilslindemann

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.

jcoglan avatar Mar 31 '22 13:03 jcoglan