Class: Riml::Compiler::CatchNodeVisitor
- Defined in:
- lib/compiler.rb
Instance Method Summary collapse
-
#compile(node) ⇒ Object
regexp, block.
Methods inherited from Visitor
Constructor Details
This class inherits a constructor from Riml::Compiler::Visitor
Instance Method Details
#compile(node) ⇒ Object
regexp, block
687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/compiler.rb', line 687 def compile(node) regexp, exprs = node.regexp, node.expressions node.compiled_output = "catch" exprs.parent_node = node if regexp regexp.parent_node = node node.compiled_output << " " regexp.accept(visitor_for_node(regexp)) end node.compiled_output << "\n" exprs.accept(visitor_for_node(exprs)) node.compiled_output end |