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.
2947 2948 2949 2950 2951 |
# File 'lib/adlint/cc1/syntax.rb', line 2947 def initialize(dcr, expr) super() @declarator = dcr @expression = expr end |
Instance Attribute Details
#declarator ⇒ Object (readonly)
Returns the value of attribute declarator.
2953 2954 2955 |
# File 'lib/adlint/cc1/syntax.rb', line 2953 def declarator @declarator end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
2954 2955 2956 |
# File 'lib/adlint/cc1/syntax.rb', line 2954 def expression @expression end |
Instance Method Details
#bitfield? ⇒ Boolean
2960 2961 2962 |
# File 'lib/adlint/cc1/syntax.rb', line 2960 def bitfield? @expression != nil end |
#inspect(indent = 0) ⇒ Object
2964 2965 2966 |
# File 'lib/adlint/cc1/syntax.rb', line 2964 def inspect(indent = 0) " " * indent + short_class_name end |
#location ⇒ Object
2956 2957 2958 |
# File 'lib/adlint/cc1/syntax.rb', line 2956 def location @declarator ? @declarator.location : @expression.location end |