A pattern matcher and an embedded Ruby DSL for specifying patterns.
The patterns are used for matching ASTs produced by ParseTree (http://www.zenspider.com/ZSS/Products/ParseTree/index.html), which are representations of Ruby ASTs as s-expressions. Eg. "1+1" is represented as [:lit, 1,:+,1].
Analyzing ParseTree expressions with patterns is much more readable than having to use a visitor based approach.
没有任何数据可供显示