Please sign in to comment.
Grep visitor for finding nodes in the AST.
- Loading branch information...
|@@ -0,0 +1,13 @@|
|+# A visitor for copying the full structure of a Sass tree.|
|+class Sass::Tree::Visitors::Grep < Sass::Tree::Visitors::Base|
|+ def visit(node, &block)|
|+ found = |
|+ found << node if yield(node)|
|+ node.children.each do |child||
|+ found += visit(child, &block)|