class LL::Token
A Token
contains the data of a single lexer token.
Attributes
source_line[R]
type[R]
value[R]
Public Class Methods
new(type, value, source_line)
click to toggle source
@param [Symbol] type @param [String] value @param [LL::SourceLine] source_line
# File lib/ll/token.rb, line 13 def initialize(type, value, source_line) @type = type @value = value @source_line = source_line end
Public Instance Methods
==(other)
click to toggle source
@return [TrueClass|FalseClass]
# File lib/ll/token.rb, line 22 def ==(other) return false unless other.class == self.class return type == other.type && value == other.value && source_line == other.source_line end