Class: SystemRDL::Parser::TokenRange
- Inherits:
-
Object
- Object
- SystemRDL::Parser::TokenRange
- Defined in:
- lib/systemrdl/parser/token.rb
Instance Attribute Summary collapse
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#tail ⇒ Object
readonly
Returns the value of attribute tail.
Instance Method Summary collapse
-
#initialize(head, tail = nil) ⇒ TokenRange
constructor
A new instance of TokenRange.
Constructor Details
#initialize(head, tail = nil) ⇒ TokenRange
Returns a new instance of TokenRange.
48 49 50 51 52 |
# File 'lib/systemrdl/parser/token.rb', line 48 def initialize(head, tail = nil) @head = head @tail = tail || head freeze end |
Instance Attribute Details
#head ⇒ Object (readonly)
Returns the value of attribute head.
54 55 56 |
# File 'lib/systemrdl/parser/token.rb', line 54 def head @head end |
#tail ⇒ Object (readonly)
Returns the value of attribute tail.
55 56 57 |
# File 'lib/systemrdl/parser/token.rb', line 55 def tail @tail end |