class Token

Attributes

type[R]
value[R]

Public Class Methods

new(type, value = nil) click to toggle source
# File lib/simpler_lexer/token.rb, line 6
def initialize(type, value = nil)
  @type = type
  @value = value
end

Public Instance Methods

inspect() click to toggle source
# File lib/simpler_lexer/token.rb, line 11
def inspect
  @value ? { @type => @value } : @type.to_s
end