Sha256: 9eae9a01a9da8797d6e78f68cc208d1f6fada89e580ff240256e5a6ce1dc66fe

Contents?: true

Size: 540 Bytes

Versions: 334

Compression:

Stored size: 540 Bytes

Contents

module Treetop
  module Compiler    
    class AnythingSymbol < AtomicExpression
      def compile(address, builder, parent_expression = nil)
        super
        builder.if__ "index < input_length" do
          assign_result "instantiate_node(#{node_class_name},input, index...(index + 1))"
          extend_result_with_inline_module
          builder << "@index += 1"
        end
        builder.else_ do
          builder << 'terminal_parse_failure("any character")'
          assign_result 'nil'
        end
      end
    end
  end
end

Version data entries

334 entries across 289 versions & 37 rubygems

Version Path
cloudhead-less-1.0.8 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.0.9 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.0 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.1 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.10 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.11 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.12 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.13 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.2 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.3 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.4 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.5 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.6 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.7 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.8 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.1.9 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.2.0 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.2.1 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.2.2 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
cloudhead-less-1.2.3 lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb