I'm working on building a proper AST with Parslet::Transform. As a simple
first step, I am starting with comments. The tree I'm transforming has the
form
[ { :comment => ' whatever'@1 } ]
..., so obviously a simple tree. However Parslet is blowing up with an
error[1] when it gets to the ' whatever' slice. I copied the output from
pry into a gist[2] to help demonstrate what's going on, along with the
actual transform class.
[1] /Users/thomas/Code/rip-parslet/lib/parslet/transform.rb:206:in `+': no
implicit conversion of nil into Array (TypeError)
[2] https://gist.github.com/ravinggenius/5283036
Some additional points:
* I have parslet checked out locally, and it is up to date. The problem
still happens when I use the latest RubyGems version.
* I'm getting the same error with and without the comment rule.
* When I do have the rule, the rule never gets called.
Any ideas?
--
Thomas Ingram