Class: AdLint::Cpp::SpecialMacro
- Inherits:
-
ObjectLikeMacro
- Object
- Macro
- ObjectLikeMacro
- AdLint::Cpp::SpecialMacro
- Defined in:
- lib/adlint/cpp/macro.rb
Direct Known Subclasses
AdLintSpecificMacro1, AdLintSpecificMacro2, AdLintSpecificMacro3, AdLintSpecificMacro4, DateMacro, FileMacro, LineMacro, LintSpecificMacro1, LintSpecificMacro2, LintSpecificMacro3, LintSpecificMacro4, StdcHostedMacro, StdcIec559ComplexMacro, StdcIec559Macro, StdcIso10646Macro, StdcMacro, StdcMbMightNeqWcMacro, StdcVersionMacro, TimeMacro
Instance Attribute Summary collapse
-
#replacement_list ⇒ Object
readonly
Returns the value of attribute replacement_list.
Attributes inherited from Macro
Instance Method Summary collapse
- #expand(toks, macro_tbl, repl_ctxt) ⇒ Object
-
#initialize(name_str) ⇒ SpecialMacro
constructor
A new instance of SpecialMacro.
Methods inherited from ObjectLikeMacro
#function_like?, #replaceable_size
Methods inherited from Macro
#function_like?, #location, #name
Methods included from LocationHolder
Constructor Details
#initialize(name_str) ⇒ SpecialMacro
Returns a new instance of SpecialMacro.
398 399 400 401 |
# File 'lib/adlint/cpp/macro.rb', line 398 def initialize(name_str) super(PseudoObjectLikeDefineLine.new(name_str)) @replacement_list = nil end |
Instance Attribute Details
#replacement_list ⇒ Object (readonly)
Returns the value of attribute replacement_list.
403 404 405 |
# File 'lib/adlint/cpp/macro.rb', line 403 def replacement_list @replacement_list end |
Instance Method Details
#expand(toks, macro_tbl, repl_ctxt) ⇒ Object
405 406 407 408 |
# File 'lib/adlint/cpp/macro.rb', line 405 def (toks, macro_tbl, repl_ctxt) @replacement_list = generate_replacement_list(toks.first) super end |