Module: Unparser::NodeHelpers
- Included in:
- CLI::Source, Emitter, Preprocessor
- Defined in:
- lib/unparser/node_helpers.rb
Instance Method Summary collapse
-
#n(type, children = []) ⇒ Parser::AST::Node
private
Helper for building nodes.
-
#s(type, *children) ⇒ Parser::AST::Node
private
Helper for building nodes.
Instance Method Details
#n(type, children = []) ⇒ Parser::AST::Node
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Helper for building nodes
26 27 28 |
# File 'lib/unparser/node_helpers.rb', line 26 def n(type, children = []) Parser::AST::Node.new(type, children) end |
#s(type, *children) ⇒ Parser::AST::Node
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Helper for building nodes
14 15 16 |
# File 'lib/unparser/node_helpers.rb', line 14 def s(type, *children) Parser::AST::Node.new(type, children) end |