class RBS::Parser::Token

Attributes

location[R]
type[R]

Public Class Methods

new(type:, location:) click to toggle source
# File rbs-3.6.1/lib/rbs/parser/token.rb, line 9
def initialize(type:, location:)
  @type = type
  @location = location
end

Public Instance Methods

comment?() click to toggle source
# File rbs-3.6.1/lib/rbs/parser/token.rb, line 18
def comment?
  @type == :tCOMMENT || @type == :tLINECOMMENT
end
value() click to toggle source
# File rbs-3.6.1/lib/rbs/parser/token.rb, line 14
def value
  @location.source
end