Class: Riml::Compiler::DictGetBracketNodeVisitor
- Defined in:
- lib/compiler.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Visitor
Constructor Details
This class inherits a constructor from Riml::Compiler::Visitor
Instance Method Details
#compile(node) ⇒ Object
703 704 705 706 707 708 709 710 711 712 713 714 715 |
# File 'lib/compiler.rb', line 703 def compile(node) node.dict.parent_node = node node.keys.each do |k| k.parent_node = node end node.dict.accept(visitor_for_node(node.dict)) node.keys.each do |key| node.compiled_output << '[' key.accept(visitor_for_node(key)) node.compiled_output << ']' end node.compiled_output end |