Class: OrigenSTIL::Syntax::Extractor
- Inherits:
-
Object
- Object
- OrigenSTIL::Syntax::Extractor
- Includes:
- AST::Processor::Mixin
- Defined in:
- lib/origen_stil/syntax/node.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
61 62 63 |
# File 'lib/origen_stil/syntax/node.rb', line 61 def results @results end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
60 61 62 |
# File 'lib/origen_stil/syntax/node.rb', line 60 def types @types end |
Instance Method Details
#handler_missing(node) ⇒ Object
73 74 75 76 |
# File 'lib/origen_stil/syntax/node.rb', line 73 def handler_missing(node) @results << node if types.include?(node.type) process_all(node.children) end |
#process(node, types = nil) ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/origen_stil/syntax/node.rb', line 63 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 |