Class: AdLint::Cc1::InitDeclarator
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::InitDeclarator
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#declarator ⇒ Object
readonly
Returns the value of attribute declarator.
-
#equals_sign ⇒ Object
readonly
Returns the value of attribute equals_sign.
-
#initializer ⇒ Object
readonly
Returns the value of attribute initializer.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
-
#initialize(dcr, init, equals_sign) ⇒ InitDeclarator
constructor
A new instance of InitDeclarator.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(dcr, init, equals_sign) ⇒ InitDeclarator
Returns a new instance of InitDeclarator.
2695 2696 2697 2698 2699 2700 |
# File 'lib/adlint/cc1/syntax.rb', line 2695 def initialize(dcr, init, equals_sign) super() @declarator = dcr @initializer = init @equals_sign = equals_sign end |
Instance Attribute Details
#declarator ⇒ Object (readonly)
Returns the value of attribute declarator.
2702 2703 2704 |
# File 'lib/adlint/cc1/syntax.rb', line 2702 def declarator @declarator end |
#equals_sign ⇒ Object (readonly)
Returns the value of attribute equals_sign.
2704 2705 2706 |
# File 'lib/adlint/cc1/syntax.rb', line 2704 def equals_sign @equals_sign end |
#initializer ⇒ Object (readonly)
Returns the value of attribute initializer.
2703 2704 2705 |
# File 'lib/adlint/cc1/syntax.rb', line 2703 def initializer @initializer end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
2710 2711 2712 |
# File 'lib/adlint/cc1/syntax.rb', line 2710 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
2706 2707 2708 |
# File 'lib/adlint/cc1/syntax.rb', line 2706 def location @declarator.identifier.location end |