Class: AdLint::Cpp::UnknownDirective
- Inherits:
-
GroupPart
- Object
- SyntaxNode
- GroupPart
- AdLint::Cpp::UnknownDirective
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(tok) ⇒ UnknownDirective
constructor
A new instance of UnknownDirective.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(tok) ⇒ UnknownDirective
Returns a new instance of UnknownDirective.
504 505 506 |
# File 'lib/adlint/cpp/syntax.rb', line 504 def initialize(tok) @token = tok end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
508 509 510 |
# File 'lib/adlint/cpp/syntax.rb', line 508 def token @token end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
514 515 516 |
# File 'lib/adlint/cpp/syntax.rb', line 514 def inspect(indent = 0) " " * indent + "#{short_class_name} (#{@token.inspect})" end |
#location ⇒ Object
510 511 512 |
# File 'lib/adlint/cpp/syntax.rb', line 510 def location @token.location end |