Class: AdLint::Cc1::StructDeclarator
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cc1::StructDeclarator
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#declarator ⇒ Object
readonly
Returns the value of attribute declarator.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
- #bitfield? ⇒ Boolean
-
#initialize(dcr, expr) ⇒ StructDeclarator
constructor
A new instance of StructDeclarator.
- #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, expr) ⇒ StructDeclarator
Returns a new instance of StructDeclarator.
2928 2929 2930 2931 2932 |
# File 'lib/adlint/cc1/syntax.rb', line 2928 def initialize(dcr, expr) super() @declarator = dcr @expression = expr end |
Instance Attribute Details
#declarator ⇒ Object (readonly)
Returns the value of attribute declarator.
2934 2935 2936 |
# File 'lib/adlint/cc1/syntax.rb', line 2934 def declarator @declarator end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
2935 2936 2937 |
# File 'lib/adlint/cc1/syntax.rb', line 2935 def expression @expression end |
Instance Method Details
#bitfield? ⇒ Boolean
2941 2942 2943 |
# File 'lib/adlint/cc1/syntax.rb', line 2941 def bitfield? @expression != nil end |
#inspect(indent = 0) ⇒ Object
2945 2946 2947 |
# File 'lib/adlint/cc1/syntax.rb', line 2945 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
2937 2938 2939 |
# File 'lib/adlint/cc1/syntax.rb', line 2937 def location @declarator ? @declarator.location : @expression.location end |