# class Treetop::Compiler::Optional

### Public Instance Methods

compile(address, builder, parent_expression) click to toggle source
Calls superclass method

    # File lib/treetop/compiler/node_classes/optional.rb, line 4
    def compile(address, builder, parent_expression)
      super
      use_vars :result
      obtain_new_subexpression_address
      parent_expression.atomic.compile(subexpression_address, builder)

      builder.if__ subexpression_success? do
        assign_result subexpression_result_var
      end
      builder.else_ do
        assign_result epsilon_node
      end
    end