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
getter attr_writer setter attr_accessor getter y setter.
Constructor Details
#initialize(type, lineNum, colNum) ⇒ Token
getter attr_writer setter attr_accessor getter y setter
6 7 8 9 10 |
# File 'lib/token.rb', line 6 def initialize(type,lineNum,colNum) @type = type #Variable de instancia empieza @line = lineNum #con @ @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 |