Sha256: 199a559339d956bf1b0be6028fd534615e2201956c64d1d9ba26eb8efdb810a9
Contents?: true
Size: 464 Bytes
Versions: 19
Compression:
Stored size: 464 Bytes
Contents
# encoding: utf-8 module Rubocop # A basic wrapper around Parser's tokens. class Token attr_reader :pos, :type, :text def self.from_parser_token(parser_token) type, details = *parser_token text, range = *details new(range, type, text) end def initialize(pos, type, text) @pos, @type, @text = pos, type, text end def to_s "[[#{@pos.line}, #{@pos.column}], #{@type}, #{@text.inspect}]" end end end
Version data entries
19 entries across 19 versions & 1 rubygems