Class: Omnium::Lexer::Token
- Inherits:
-
Object
- Object
- Omnium::Lexer::Token
- Defined in:
- lib/omnium/lexer/token.rb
Overview
A token is a string with an assigned and identified meaning.
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type, value) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(type, value) ⇒ Token
Returns a new instance of Token.
9 10 11 12 |
# File 'lib/omnium/lexer/token.rb', line 9 def initialize(type, value) @type = type @value = value end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/omnium/lexer/token.rb', line 7 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/omnium/lexer/token.rb', line 7 def value @value end |