Class: AdLint::Cpp::ErrorLine

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

Instance Attribute Summary collapse

Attributes inherited from ControlLine

#keyword

Instance Method Summary collapse

Methods inherited from ControlLine

#location

Methods inherited from SyntaxNode

#location, #short_class_name

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(keyword, pp_toks) ⇒ ErrorLine

Returns a new instance of ErrorLine.



444
445
446
447
# File 'lib/adlint/cpp/syntax.rb', line 444

def initialize(keyword, pp_toks)
  super(keyword)
  @pp_tokens = pp_toks
end

Instance Attribute Details

#pp_tokensObject (readonly)

Returns the value of attribute pp_tokens.



449
450
451
# File 'lib/adlint/cpp/syntax.rb', line 449

def pp_tokens
  @pp_tokens
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



451
452
453
454
# File 'lib/adlint/cpp/syntax.rb', line 451

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