Class: AdLint::Cpp::PseudoFunctionLikeDefineLine

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

Instance Attribute Summary

Attributes inherited from FunctionLikeDefineLine

#identifier_list

Attributes inherited from DefineLine

#identifier, #replacement_list, #symbol

Attributes inherited from ControlLine

#keyword

Instance Method Summary collapse

Methods inherited from FunctionLikeDefineLine

#have_va_list?, #inspect

Methods inherited from ControlLine

#location

Methods inherited from SyntaxNode

#inspect, #location, #short_class_name

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(name_str, param_names) ⇒ PseudoFunctionLikeDefineLine

Returns a new instance of PseudoFunctionLikeDefineLine.



400
401
402
403
404
405
406
# File 'lib/adlint/cpp/syntax.rb', line 400

def initialize(name_str, param_names)
  id_list = IdentifierList.new(
    param_names.map { |str| Token.new(:PP_TOKEN, str, Location.new) })

  super(Token.new(:DEFINE, "#define", Location.new),
        Token.new(:PP_TOKEN, name_str, Location.new), id_list, nil, nil)
end

Instance Method Details

#mark_as_referred_by(tok) ⇒ Object



408
# File 'lib/adlint/cpp/syntax.rb', line 408

def mark_as_referred_by(tok) end