Sha256: 57185c8280df659e2fa483acb40f183aac9858747cc4c58f0b934b6c58eea36d
Contents?: true
Size: 587 Bytes
Versions: 40
Compression:
Stored size: 587 Bytes
Contents
require 'ast' module OrigenTesters::ATP module AST class Extractor include ::AST::Processor::Mixin attr_reader :types attr_reader :results def process(node, types = nil) if types @types = types @results = [] # node = AST::Node.new(:wrapper, node) unless node.respond_to?(:to_ast) end super(node) if node.respond_to?(:to_ast) results end def handler_missing(node) @results << node if types.include?(node.type) process_all(node.children) end end end end
Version data entries
40 entries across 40 versions & 1 rubygems