Class: Token
- Inherits:
-
Object
- Object
- Token
- Defined in:
- lib/token.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, lineNum, colNum) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(type, lineNum, colNum) ⇒ Token
Returns a new instance of Token.
4 5 6 7 8 |
# File 'lib/token.rb', line 4 def initialize(type,lineNum,colNum) @type = type @line = lineNum @col = colNum end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
2 3 4 |
# File 'lib/token.rb', line 2 def col @col end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
2 3 4 |
# File 'lib/token.rb', line 2 def line @line end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
2 3 4 |
# File 'lib/token.rb', line 2 def type @type end |