Class: SystemRDL::Parser::TokenRange

Inherits:
Object
  • Object
show all
Defined in:
lib/systemrdl/parser/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#headObject (readonly)

Returns the value of attribute head.



54
55
56
# File 'lib/systemrdl/parser/token.rb', line 54

def head
  @head
end

#tailObject (readonly)

Returns the value of attribute tail.



55
56
57
# File 'lib/systemrdl/parser/token.rb', line 55

def tail
  @tail
end