Sha256: 11936ac54e4dbb08662b7093a3e6a5bf87681507a241b71c47cee2a0993f03e5

Contents?: true

Size: 579 Bytes

Versions: 35

Compression:

Stored size: 579 Bytes

Contents

require "liquidscript/icr/representable"

module Liquidscript
  module Scanner
    class Token

      attr_accessor :type
      attr_accessor :value
      attr_reader :line
      attr_reader :column

      include Enumerable
      include ICR::Representable

      def initialize(type, value, line, column)
        @type   = type
        @line   = line
        @column = column
        @value  = value
      end

      def to_a
        [@type, @value]
      end

      def type?(type)
        @type == type
      end

      def empty?
        false
      end

    end

  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
liquidscript-0.11.0 lib/liquidscript/scanner/token.rb
liquidscript-0.11.0.rc1 lib/liquidscript/scanner/token.rb
liquidscript-0.10.4 lib/liquidscript/scanner/token.rb
liquidscript-0.10.3 lib/liquidscript/scanner/token.rb
liquidscript-0.10.2 lib/liquidscript/scanner/token.rb
liquidscript-0.10.1 lib/liquidscript/scanner/token.rb
liquidscript-0.10.0 lib/liquidscript/scanner/token.rb
liquidscript-0.9.2 lib/liquidscript/scanner/token.rb
liquidscript-0.9.1 lib/liquidscript/scanner/token.rb
liquidscript-0.9.0 lib/liquidscript/scanner/token.rb
liquidscript-0.8.2 lib/liquidscript/scanner/token.rb
liquidscript-0.8.1 lib/liquidscript/scanner/token.rb
liquidscript-0.8.0 lib/liquidscript/scanner/token.rb
liquidscript-0.7.12 lib/liquidscript/scanner/token.rb
liquidscript-0.7.11 lib/liquidscript/scanner/token.rb
liquidscript-0.7.10 lib/liquidscript/scanner/token.rb
liquidscript-0.7.9 lib/liquidscript/scanner/token.rb
liquidscript-0.7.8 lib/liquidscript/scanner/token.rb
liquidscript-0.7.6 lib/liquidscript/scanner/token.rb
liquidscript-0.7.5 lib/liquidscript/scanner/token.rb