Class: AdLint::Cpp::TextLine

Inherits:
GroupPart show all
Defined in:
lib/adlint/cpp/syntax.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SyntaxNode

#short_class_name

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(tok) ⇒ TextLine

Returns a new instance of TextLine.



472
473
474
# File 'lib/adlint/cpp/syntax.rb', line 472

def initialize(tok)
  @token = tok
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



476
477
478
# File 'lib/adlint/cpp/syntax.rb', line 476

def token
  @token
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



482
483
484
# File 'lib/adlint/cpp/syntax.rb', line 482

def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{@token.inspect})"
end

#locationObject



478
479
480
# File 'lib/adlint/cpp/syntax.rb', line 478

def location
  @token.location
end