Class: Riml::Compiler::GetVariableByScopeAndDictNameNodeVisitor

Inherits:
Visitor
  • Object
show all
Defined in:
lib/riml/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



739
740
741
742
743
744
745
746
747
748
749
# File 'lib/riml/compiler.rb', line 739

def compile(node)
  node.scope_modifier.parent = node
  node.scope_modifier.accept(visitor_for_node(node.scope_modifier))
  node.keys.each do |key|
    key.parent = node
    node.compiled_output << '['
    key.accept(visitor_for_node(key))
    node.compiled_output << ']'
  end
  node.compiled_output
end