kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
809 stars 95 forks source link

Fix bug where Array was returned, not Expression #98

Closed ajh closed 7 years ago

ajh commented 10 years ago

Hi, I'm playing around with accelerators and noticed that an expression like the following becomes an array by accident:

expression = a.str('\\') >> a.any |
  a.str("''") |
  a.str("'").absent? >> a.any

expression is an array (the value of @args) when it should be an Expression.

kschiess commented 10 years ago

Hei - thanks for reporting this. If you want me to merge, I'll need a spec - otherwise I'll just include the fix once I restart work on accelerators.