Class: AdLint::Cc1::SyntaxNode
- Inherits:
-
Object
- Object
- AdLint::Cc1::SyntaxNode
- Includes:
- LocationHolder, Visitable
- Defined in:
- lib/adlint/cc1/syntax.rb
Overview
DESCRIPTION
SyntaxNode class hierarchy
SyntaxNode
<-- Expression
<-- ErrorExpression
<-- PrimaryExpression
<-- ObjectSpecifier
<-- ConstantSpecifier
<-- StringLiteralSpecifier
<-- NullConstantSpecifier
<-- GroupedExpression
<-- PostfixExpression
<-- ArraySubscriptExpression
<-- FunctionCallExpression
<-- MemberAccessByValueExpression
<-- MemberAccessByPointerExpression
<-- BitAccessByValueExpression
<-- BitAccessByPointerExpression
<-- PostfixIncrementExpression
<-- PostfixDecrementExpression
<-- CompoundLiteralExpression
<-- UnaryExpression
<-- PrefixIncrementExpression
<-- PrefixDecrementExpression
<-- AddressExpression
<-- IndirectionExpression
<-- UnaryArithmeticExpression
<-- SizeofExpression
<-- SizeofTypeExpression
<-- AlignofExpression
<-- AlignofTypeExpression
<-- CastExpression
<-- BinaryExpression
<-- MultiplicativeExpression
<-- AdditiveExpression
<-- ShiftExpression
<-- RelationalExpression
<-- EqualityExpression
<-- AndExpression
<-- ExclusiveOrExpression
<-- InclusiveOrExpression
<-- LogicalAndExpression
<-- LogicalOrExpression
<-- ConditionalExpression
<-- SimpleAssignmentExpression
<-- CompoundAssignmentExpression
<-- CommaSeparatedExpression
<-- Declaration
<-- FunctionDeclaration -------------------- SymbolicElement <<module>>
<-- VariableDeclaration ----------------------+ | | | |
<-- Definition | | | |
<-- VariableDefinition --------------------+ | | |
<-- PseudoVariableDefinition | | |
<-- FunctionDefinition -----------------------+ | |
<-- KandRFunctionDefinition | |
<-- AnsiFunctionDefinition | |
<-- ParameterDefinition | |
<-- TypeDeclaration -----------------------------------+ |
<-- TypedefDeclaration |
<-- StructTypeDeclaration |
<-- PseudoStructTypeDeclaration |
<-- UnionTypeDeclaration |
<-- PseudoUnionTypeDeclaration |
<-- EnumTypeDeclaration |
<-- PseudoEnumTypeDeclaration |
<-- DeclarationSpecifiers |
<-- InitDeclarator |
<-- TypeSpecifier |
<-- StandardTypeSpecifier |
<-- TypedefTypeSpecifier |
<-- StructSpecifier |
<-- UnionSpecifier |
<-- TypeofTypeSpecifier |
<-- StructDeclaration |
<-- MemberDeclaration |
<-- SpecifierQualifierList |
<-- StructDeclarator |
<-- EnumSpecifier |
<-- Enumerator -------------------------------------------+
<-- Declarator
<-- IdentifierDeclarator
<-- GroupedDeclarator
<-- ArrayDeclarator
<-- FunctionDeclarator
<-- AnsiFunctionDeclarator
<-- KandRFunctionDeclarator
<-- AbbreviatedFunctionDeclarator
<-- AbstractDeclarator
<-- PointerAbstractDeclarator
<-- GroupedAbstractDeclarator
<-- ArrayAbstractDeclarator
<-- FunctionAbstractDeclarator
<-- ParameterTypeList
<-- ParameterDeclaration
<-- Statement
<-- ErrorStatement
<-- LabeledStatement
<-- GenericLabeledStatement
<-- CaseLabeledStatement
<-- DefaultLabeledStatement
<-- CompoundStatement
<-- ExpressionStatement
<-- SelectionStatement
<-- IfStatement
<-- IfElseStatement
<-- SwitchStatement
<-- IterationStatement
<-- WhileStatement
<-- DoStatement
<-- ForStatement
<-- C99ForStatement
<-- JumpStatement
<-- GotoStatement
<-- ContinueStatement
<-- BreakStatement
<-- ReturnStatement
<-- TranslationUnit
<-- TypeName
<-- Initializer
Direct Known Subclasses
Declaration, DeclarationSpecifiers, Declarator, Definition, Enumerator, Expression, FunctionDeclaration, InitDeclarator, Initializer, MemberDeclaration, ParameterDeclaration, ParameterTypeList, SpecifierQualifierList, Statement, StructDeclaration, StructDeclarator, TranslationUnit, TypeDeclaration, TypeName, TypeSpecifier, VariableDeclaration
Instance Attribute Summary collapse
-
#head_token ⇒ Object
Returns the value of attribute head_token.
-
#subsequent_sequence_point ⇒ Object
readonly
Returns the value of attribute subsequent_sequence_point.
-
#tail_token ⇒ Object
Returns the value of attribute tail_token.
Instance Method Summary collapse
- #head_location ⇒ Object
-
#initialize ⇒ SyntaxNode
constructor
A new instance of SyntaxNode.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
- #short_class_name ⇒ Object
- #tail_location ⇒ Object
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize ⇒ SyntaxNode
Returns a new instance of SyntaxNode.
165 166 167 168 169 |
# File 'lib/adlint/cc1/syntax.rb', line 165 def initialize @head_token = nil @tail_token = nil @subsequent_sequence_point = nil end |
Instance Attribute Details
#head_token ⇒ Object
Returns the value of attribute head_token.
171 172 173 |
# File 'lib/adlint/cc1/syntax.rb', line 171 def head_token @head_token end |
#subsequent_sequence_point ⇒ Object (readonly)
Returns the value of attribute subsequent_sequence_point.
173 174 175 |
# File 'lib/adlint/cc1/syntax.rb', line 173 def subsequent_sequence_point @subsequent_sequence_point end |
#tail_token ⇒ Object
Returns the value of attribute tail_token.
172 173 174 |
# File 'lib/adlint/cc1/syntax.rb', line 172 def tail_token @tail_token end |
Instance Method Details
#head_location ⇒ Object
179 180 181 |
# File 'lib/adlint/cc1/syntax.rb', line 179 def head_location @head_token ? @head_token.location : nil end |
#inspect(indent = 0) ⇒ Object
187 188 189 |
# File 'lib/adlint/cc1/syntax.rb', line 187 def inspect(indent = 0) subclass_responsibility end |
#location ⇒ Object
175 176 177 |
# File 'lib/adlint/cc1/syntax.rb', line 175 def location subclass_responsibility end |
#short_class_name ⇒ Object
191 192 193 |
# File 'lib/adlint/cc1/syntax.rb', line 191 def short_class_name self.class.name.sub(/\A.*::/, "") end |
#tail_location ⇒ Object
183 184 185 |
# File 'lib/adlint/cc1/syntax.rb', line 183 def tail_location @tail_token ? @tail_token.location : nil end |