-
-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Labels
Milestone
Description
Currently we need to write separate code to convert pest parsed representation to our own AST representation, as shown in JSON example. The drawback of that approach is that you have to keep that conversion in sync with grammar, as they are in different places. Bison have semantic actions and peg crate also supports them (see a:e1 b:e2 c:e3 { rust }). It allows to get you own AST type right after parsing and you can change AST construction steps right when you change your grammar, no need to separate conversion step, you can even avoid creating intermidiate parser-related values (Pair) and just immidiately produce user defined types while parsing
Reactions are currently unavailable