ohmjs / ohm

A library and language for building parsers, interpreters, compilers, etc.
MIT License
5.01k stars 217 forks source link

feat(toAST): by default, represent built-in list rules by arrays #398

Closed pdubroy closed 2 years ago

pdubroy commented 2 years ago

BREAKING CHANGE: Change the default behavior toAST for the built-in list rules (ListOf and friends). Both the syntactic (ListOf, ...) and lexical versions (listOf, ...) are now represented as arrays, with the separators discarded. Previously, the syntactic versions were represented by arrays, but with separators included, and the lexical versions were represented as strings (just like other lexical rules).

Fixes #394.