Class: AdLint::Cpp::PragmaLine
- Inherits:
-
ControlLine
- Object
- SyntaxNode
- GroupPart
- ControlLine
- AdLint::Cpp::PragmaLine
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#pp_tokens ⇒ Object
readonly
Returns the value of attribute pp_tokens.
Attributes inherited from ControlLine
Instance Method Summary collapse
-
#initialize(keyword, pp_toks) ⇒ PragmaLine
constructor
A new instance of PragmaLine.
- #inspect(indent = 0) ⇒ Object
Methods inherited from ControlLine
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(keyword, pp_toks) ⇒ PragmaLine
Returns a new instance of PragmaLine.
458 459 460 461 |
# File 'lib/adlint/cpp/syntax.rb', line 458 def initialize(keyword, pp_toks) super(keyword) @pp_tokens = pp_toks end |
Instance Attribute Details
#pp_tokens ⇒ Object (readonly)
Returns the value of attribute pp_tokens.
463 464 465 |
# File 'lib/adlint/cpp/syntax.rb', line 463 def pp_tokens @pp_tokens end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
465 466 467 468 |
# File 'lib/adlint/cpp/syntax.rb', line 465 def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@pp_tokens ? @pp_tokens.inspect : ""})" end |