Class: Rley::Tokens::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/rley/tokens/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(theLexeme, aTerminal) ⇒ Token

Returns a new instance of Token.



7
8
9
10
# File 'lib/rley/tokens/token.rb', line 7

def initialize(theLexeme, aTerminal)
  @lexeme = theLexeme
  @terminal = aTerminal
end

Instance Attribute Details

#lexemeObject (readonly)

Returns the value of attribute lexeme.



4
5
6
# File 'lib/rley/tokens/token.rb', line 4

def lexeme
  @lexeme
end

#terminalObject (readonly)

Returns the value of attribute terminal.



5
6
7
# File 'lib/rley/tokens/token.rb', line 5

def terminal
  @terminal
end