Sha256: 6148f1f139118d05d0c9d35560339c684fcb7a91a9838c4eeae3ed0b54d799f1

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

module Treetop
  class AnythingSymbol < TerminalParsingExpression
    def initialize
      super
    end
    
    def parse_at(input, start_index, parser)
      if start_index < input.length
        interval = (start_index...(start_index + 1))
        return node_class.new(input, interval)
      else
        TerminalParseFailure.new(start_index, self)
      end
    end
    
    def to_s
      '.'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
treetop-0.1.0 lib/treetop/grammar/parsing_expressions/anything_symbol.rb