Class: Cooklang::Token
- Inherits:
-
Struct
- Object
- Struct
- Cooklang::Token
- Defined in:
- lib/cooklang/lexer.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#line ⇒ Object
Returns the value of attribute line.
-
#position ⇒ Object
Returns the value of attribute position.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type, value, position = 0, line = 1, column = 1) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(type, value, position = 0, line = 1, column = 1) ⇒ Token
Returns a new instance of Token.
7 8 9 |
# File 'lib/cooklang/lexer.rb', line 7 def initialize(type, value, position = 0, line = 1, column = 1) super end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
6 7 8 |
# File 'lib/cooklang/lexer.rb', line 6 def column @column end |
#line ⇒ Object
Returns the value of attribute line
6 7 8 |
# File 'lib/cooklang/lexer.rb', line 6 def line @line end |
#position ⇒ Object
Returns the value of attribute position
6 7 8 |
# File 'lib/cooklang/lexer.rb', line 6 def position @position end |
#type ⇒ Object
Returns the value of attribute type
6 7 8 |
# File 'lib/cooklang/lexer.rb', line 6 def type @type end |
#value ⇒ Object
Returns the value of attribute value
6 7 8 |
# File 'lib/cooklang/lexer.rb', line 6 def value @value end |