Class: Riml::Compiler::WrapInParensNodeVisitor

Inherits:
Visitor
  • Object
show all
Defined in:
lib/compiler.rb

Instance Method Summary collapse

Methods inherited from Visitor

#initialize, #visit

Constructor Details

This class inherits a constructor from Riml::Compiler::Visitor

Instance Method Details

#compile(node) ⇒ Object



249
250
251
252
253
254
# File 'lib/compiler.rb', line 249

def compile(node)
  node.compiled_output << "("
  node.expression.parent_node = node
  node.expression.accept(visitor_for_node(node.expression))
  node.compiled_output << ")"
end