Class: AdLint::Cpp::EndifLine

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) ⇒ EndifLine

Returns a new instance of EndifLine.



289
290
291
# File 'lib/adlint/cpp/syntax.rb', line 289

def initialize(keyword)
  @keyword = keyword
end

Instance Attribute Details

#keywordObject (readonly)

Returns the value of attribute keyword.



293
294
295
# File 'lib/adlint/cpp/syntax.rb', line 293

def keyword
  @keyword
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



299
300
301
# File 'lib/adlint/cpp/syntax.rb', line 299

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

#locationObject



295
296
297
# File 'lib/adlint/cpp/syntax.rb', line 295

def location
  @keyword.location
end