Class: Rley::Tokens::Token
- Inherits:
-
Object
- Object
- Rley::Tokens::Token
- Defined in:
- lib/rley/tokens/token.rb
Instance Attribute Summary collapse
-
#lexeme ⇒ Object
readonly
Returns the value of attribute lexeme.
-
#terminal ⇒ Object
readonly
Returns the value of attribute terminal.
Instance Method Summary collapse
-
#initialize(theLexeme, aTerminal) ⇒ Token
constructor
A new instance of Token.
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
#lexeme ⇒ Object (readonly)
Returns the value of attribute lexeme.
4 5 6 |
# File 'lib/rley/tokens/token.rb', line 4 def lexeme @lexeme end |
#terminal ⇒ Object (readonly)
Returns the value of attribute terminal.
5 6 7 |
# File 'lib/rley/tokens/token.rb', line 5 def terminal @terminal end |