Class: SbuilderSexp::Snippets
- Inherits:
-
RootContainer
- Object
- Treetop::Runtime::SyntaxNode
- Root
- RootContainer
- SbuilderSexp::Snippets
- Defined in:
- lib/parser/parser_nodes.rb
Instance Method Summary collapse
-
#callables ⇒ Callable:array
Of ‘Callable’ tree nodes.
-
#defines ⇒ array
Of ‘Define’ tree nodes.
- #directive_definitions ⇒ Object
-
#directives ⇒ Directive:array
Of parses’ tree nodes.
- #name ⇒ Object
-
#symbol_definitions ⇒ Array
Snippets is main level parse target, and it adds to symbol table base context entries for ‘Define’ nodes.
Methods inherited from RootContainer
Methods inherited from Treetop::Runtime::SyntaxNode
#node_type, #node_value, #recursive_inject, #recursive_inject_parent, #recursive_select, #value
Instance Method Details
#callables ⇒ Callable:array
Returns of ‘Callable’ tree nodes.
43 44 45 |
# File 'lib/parser/parser_nodes.rb', line 43 def callables recursive_select( SbuilderSexp::Callable ) end |
#defines ⇒ array
Returns of ‘Define’ tree nodes.
48 49 50 |
# File 'lib/parser/parser_nodes.rb', line 48 def defines recursive_select( SbuilderSexp::Define ) end |
#directive_definitions ⇒ Object
38 39 40 |
# File 'lib/parser/parser_nodes.rb', line 38 def directive_definitions directives.map { |d| d.directives }.flatten end |
#directives ⇒ Directive:array
Returns of parses’ tree nodes.
34 35 36 |
# File 'lib/parser/parser_nodes.rb', line 34 def directives recursive_select( SbuilderSexp::Directive ) end |
#name ⇒ Object
29 30 31 |
# File 'lib/parser/parser_nodes.rb', line 29 def name node_type end |
#symbol_definitions ⇒ Array
Snippets is main level parse target, and it adds to symbol table base context entries for ‘Define’ nodes
57 58 59 |
# File 'lib/parser/parser_nodes.rb', line 57 def symbol_definitions defines.map { |c| { :node_type => c.node_type, :value => c.name, :tree => c } } end |