Methods

Class Index [+]

Quicksearch

Treetop::Compiler::OccurrenceRange

Public Instance Methods

compile(address, builder, parent_expression) click to toggle source
    # File lib/treetop/compiler/node_classes/repetition.rb, line 69
69:       def compile(address, builder, parent_expression)
70:         super
71: 
72:         if min.empty? || min.text_value.to_i == 0
73:           assign_and_extend_result
74:         else
75:           # We got some, but fewer than we wanted. There'll be a failure reported already
76:           builder.if__ "#{accumulator_var}.size < #{min.text_value}" do
77:             reset_index
78:             assign_failure start_index_var
79:           end
80:           builder.else_ do
81:             assign_and_extend_result
82:           end
83:         end
84:         end_comment(parent_expression)
85:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.