Class: RBS::Parser::Token
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/parser/token.rb |
Class Method Summary
- .new(type:, location:) ⇒ Token constructor
Instance Attribute Summary
- #comment? ⇒ Boolean readonly
- #location readonly
- #type readonly
Instance Method Summary
Constructor Details
.new(type:, location:) ⇒ Token
Instance Attribute Details
#comment? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rbs/parser/token.rb', line 18
def comment? @type == :tCOMMENT || @type == :tLINECOMMENT end
#location (readonly)
[ GitHub ]# File 'lib/rbs/parser/token.rb', line 7
attr_reader :location
#type (readonly)
[ GitHub ]# File 'lib/rbs/parser/token.rb', line 6
attr_reader :type
Instance Method Details
#value
[ GitHub ]# File 'lib/rbs/parser/token.rb', line 14
def value @location.source end