Class | YARD::Parser::Ruby::Legacy::RubyToken::Token
In: | lib/yard/parser/ruby/legacy/ruby_lex.rb
Parent: | Object

Represents a token in the Ruby lexer

### Methods

new set_text

### Constants

NO_TEXT | = | "??".freeze |  | @private

### Attributes

char_no

[R]

@return [Integer] the character number in the file/stream the token

      is located.

lex_state | [RW] | @return [Symbol] the lexical state at the token

line_no

[R]

@return [Integer] the line number in the file/stream the token is

      located.

text | [R] | @return [String] the token text value

### Public Class methods

new(line_no, char_no)

Creates a new Token object @param [Integer] line_no the line number to initialize the token to @param [Integer] char_no the char number to initialize the token to

### Public Instance methods

set_text(text)

Chainable way to sets the text attribute

@param [String] text the new text @return [Token] this token object

[Validate]