Class: AdLint::Cpp::AsmLine

Inherits:
SyntaxNode 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(keyword) ⇒ AsmLine

Returns a new instance of AsmLine.



540
541
542
# File 'lib/adlint/cpp/syntax.rb', line 540

def initialize(keyword)
  @keyword = keyword
end

Instance Attribute Details

#keywordObject (readonly)

Returns the value of attribute keyword.



544
545
546
# File 'lib/adlint/cpp/syntax.rb', line 544

def keyword
  @keyword
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



550
551
552
# File 'lib/adlint/cpp/syntax.rb', line 550

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

#locationObject



546
547
548
# File 'lib/adlint/cpp/syntax.rb', line 546

def location
  @keyword.location
end