Class: AdLint::Cpp::PseudoFunctionLikeDefineLine
- Inherits:
-
FunctionLikeDefineLine
- Object
- SyntaxNode
- GroupPart
- ControlLine
- DefineLine
- FunctionLikeDefineLine
- AdLint::Cpp::PseudoFunctionLikeDefineLine
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary
Attributes inherited from FunctionLikeDefineLine
Attributes inherited from DefineLine
#identifier, #replacement_list, #symbol
Attributes inherited from ControlLine
Instance Method Summary collapse
-
#initialize(name_str, param_names) ⇒ PseudoFunctionLikeDefineLine
constructor
A new instance of PseudoFunctionLikeDefineLine.
- #mark_as_referred_by(tok) ⇒ Object
Methods inherited from FunctionLikeDefineLine
Methods inherited from ControlLine
Methods inherited from SyntaxNode
#inspect, #location, #short_class_name
Methods included from LocationHolder
Methods included from Visitable
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 |