Class: YARD::Parser::Ruby::Legacy::RubyToken::TkId

Inherits:
Token
  • Object
show all
Defined in:
lib/yard/parser/ruby/legacy/ruby_lex.rb

Overview

Represents a Ruby identifier

Direct Known Subclasses

TkKW

Constant Summary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line_no, char_no, name) ⇒ TkId

Returns a new instance of TkId



74
75
76
77
# File 'lib/yard/parser/ruby/legacy/ruby_lex.rb', line 74

def initialize(line_no, char_no, name)
  super(line_no, char_no)
  @name = name
end

Instance Attribute Details

#char_noInteger (readonly) Originally defined in class Token

Returns the character number in the file/stream the token is located.

Returns:

  • (Integer)

    the character number in the file/stream the token is located.

#lex_stateSymbol Originally defined in class Token

Returns the lexical state at the token

Returns:

  • (Symbol)

    the lexical state at the token

#line_noInteger (readonly) Originally defined in class Token

Returns the line number in the file/stream the token is located.

Returns:

  • (Integer)

    the line number in the file/stream the token is located.

#nameObject (readonly)

Returns the value of attribute name



78
79
80
# File 'lib/yard/parser/ruby/legacy/ruby_lex.rb', line 78

def name
  @name
end

#textString (readonly) Originally defined in class Token

Returns the token text value

Returns:

  • (String)

    the token text value