Class: Loxxy::FrontEnd::Literal
- Inherits:
-
Rley::Lexical::Token
- Object
- Rley::Lexical::Token
- Loxxy::FrontEnd::Literal
- Defined in:
- lib/loxxy/front_end/literal.rb
Overview
The superclass for all tokens that have a data value.
Instance Attribute Summary collapse
-
#value ⇒ Datatype
readonly
The value expressed in one of the Lox datatype.
Instance Method Summary collapse
-
#initialize(aValue, aLexeme, aTerminal, aPosition) ⇒ Literal
constructor
Constructor.
Constructor Details
#initialize(aValue, aLexeme, aTerminal, aPosition) ⇒ Literal
Constructor.
19 20 21 22 |
# File 'lib/loxxy/front_end/literal.rb', line 19 def initialize(aValue, aLexeme, aTerminal, aPosition) super(aLexeme, aTerminal, aPosition) @value = aValue end |
Instance Attribute Details
#value ⇒ Datatype (readonly)
Returns The value expressed in one of the Lox datatype.
10 11 12 |
# File 'lib/loxxy/front_end/literal.rb', line 10 def value @value end |