module SyntaxTree
def self.search(source, query, &block)
Searches through the given source using the given pattern and yields each
def self.search(source, query, &block) pattern = Pattern.new(query).compile program = parse(source) Search.new(pattern).scan(program, &block) end