# class Treetop::Compiler::Predicate

### Public Instance Methods

assign_failure() click to toggle source
Calls superclass method Treetop::Compiler::ParsingExpression#assign_failure

    # File lib/treetop/compiler/node_classes/predicate.rb, line 15
    def assign_failure
      super(start_index_var)
    end

assign_success() click to toggle source

    # File lib/treetop/compiler/node_classes/predicate.rb, line 19
    def assign_success
      reset_index
      assign_result epsilon_node
    end

compile(address, builder, parent_expression) click to toggle source
Calls superclass method Treetop::Compiler::ParsingExpression#compile

    # File lib/treetop/compiler/node_classes/predicate.rb, line 4
    def compile(address, builder, parent_expression)
      super
      begin_comment(parent_expression)
      use_vars :result, :start_index
      obtain_new_subexpression_address
      parent_expression.prefixed_expression.compile(subexpression_address, builder)
      builder.if__(subexpression_success?) { when_success }
      builder.else_ { when_failure }
      end_comment(parent_expression)
    end