Class: AdLint::Cpp::Macro
- Inherits:
-
Object
- Object
- AdLint::Cpp::Macro
show all
- Includes:
- LocationHolder
- Defined in:
- lib/adlint/cpp/macro.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#analysis_target?
Constructor Details
#initialize(define_line) ⇒ Macro
Returns a new instance of Macro.
44
45
46
|
# File 'lib/adlint/cpp/macro.rb', line 44
def initialize(define_line)
@define_line = define_line
end
|
Instance Attribute Details
#define_line ⇒ Object
Returns the value of attribute define_line.
48
49
50
|
# File 'lib/adlint/cpp/macro.rb', line 48
def define_line
@define_line
end
|
Instance Method Details
#expand(toks, macro_tbl, repl_ctxt) ⇒ Object
62
63
64
|
# File 'lib/adlint/cpp/macro.rb', line 62
def expand(toks, macro_tbl, repl_ctxt)
@define_line.mark_as_referred_by(toks.first)
end
|
#function_like? ⇒ Boolean
66
67
68
|
# File 'lib/adlint/cpp/macro.rb', line 66
def function_like?
subclass_responsibility
end
|
#location ⇒ Object
58
59
60
|
# File 'lib/adlint/cpp/macro.rb', line 58
def location
@define_line.location
end
|
#name ⇒ Object
50
51
52
|
# File 'lib/adlint/cpp/macro.rb', line 50
def name
@define_line.identifier
end
|
#replacement_list ⇒ Object
54
55
56
|
# File 'lib/adlint/cpp/macro.rb', line 54
def replacement_list
@define_line.replacement_list
end
|