Class: AdLint::Cpp::IfdefStatement
- Inherits:
-
IfGroup
- Object
- SyntaxNode
- IfGroup
- AdLint::Cpp::IfdefStatement
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Attributes inherited from IfGroup
Instance Method Summary collapse
-
#initialize(keyword, id, group) ⇒ IfdefStatement
constructor
A new instance of IfdefStatement.
- #inspect(indent = 0) ⇒ Object
Methods inherited from IfGroup
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(keyword, id, group) ⇒ IfdefStatement
Returns a new instance of IfdefStatement.
184 185 186 187 188 |
# File 'lib/adlint/cpp/syntax.rb', line 184 def initialize(keyword, id, group) super(keyword) @identifier = id @group = group end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
191 192 193 |
# File 'lib/adlint/cpp/syntax.rb', line 191 def group @group end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
190 191 192 |
# File 'lib/adlint/cpp/syntax.rb', line 190 def identifier @identifier end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
193 194 195 196 |
# File 'lib/adlint/cpp/syntax.rb', line 193 def inspect(indent = 0) [" " * indent + "#{short_class_name} #{@identifier.inspect}", @group ? @group.inspect(indent + 1) : nil].join("\n") end |