Class: Riml::Compiler::CatchNodeVisitor
- Defined in:
- lib/riml/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
694 695 696 697 698 699 700 701 702 703 704 705 706 |
# File 'lib/riml/compiler.rb', line 694 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 |