You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a redesign of the old library that splits the code internally
into three parts:
- The grammar. This uses Peggy now instead of PEG.js, but is pretty much
unchanged.
- The AST types. These are plain objects with `type` properties. The
compiled parser outputs data matching these types.
- The expander. This does the work that was previously combined into the
expression classes.
The external API is compatible with version 1, but it's possible that
people were relying on internal details of library (e.g. instanceof
checks) so I'm bumping the major to version 2.
Because this version also returns the AST for the parsed expressions, it
should be much more suitable for constructing a separate "matcher" that
can extract variable values from a URL string.
0 commit comments