Sha256: 490f1d25603588a907e5f8965d94e2a400e5631cdbf5666276592a57b13ac4e9

Contents?: true

Size: 309 Bytes

Versions: 2

Compression:

Stored size: 309 Bytes

Contents

module Rly

  class LexToken
    attr_accessor :value
    attr_reader :type, :lexer

    def initialize(type, value, lexer)
      @type = type
      @value = value
      @lexer = lexer
    end

    def to_s
      @value.to_s
    end

    def inspect
      "#<LexToken #{@type} '#{@value}'>"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rly-0.2.1 lib/rly/lex_token.rb
rly-0.2.0 lib/rly/lex_token.rb