class YARP::Token
This represents a token from the Ruby source.
def ==(other)
def ==(other) other.is_a?(Token) && other.type == type && other.value == value end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { type: type, value: value, location: location } end
def initialize(type, value, location)
def initialize(type, value, location) @type = type @value = value @location = location end
def pretty_print(q)
def pretty_print(q) q.group do q.text(type.to_s) self.location.pretty_print(q) q.text("(") q.nest(2) do q.breakable("") q.pp(value) end q.breakable("") q.text(")") end end