summaryrefslogtreecommitdiff
path: root/src/libs/3rdparty/cplusplus/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/3rdparty/cplusplus/AST.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/AST.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/src/libs/3rdparty/cplusplus/AST.cpp b/src/libs/3rdparty/cplusplus/AST.cpp
index 312b1dcfc2..0eb73f58fb 100644
--- a/src/libs/3rdparty/cplusplus/AST.cpp
+++ b/src/libs/3rdparty/cplusplus/AST.cpp
@@ -68,7 +68,7 @@ bool AST::match(AST *pattern, ASTMatcher *matcher)
return match0(pattern, matcher);
}
-unsigned AttributeSpecifierAST::firstToken() const
+unsigned GnuAttributeSpecifierAST::firstToken() const
{
return attribute_token;
}
@@ -242,7 +242,7 @@ unsigned AsmDefinitionAST::lastToken() const
}
/** \generated */
-unsigned AttributeAST::firstToken() const
+unsigned GnuAttributeAST::firstToken() const
{
if (identifier_token)
return identifier_token;
@@ -259,7 +259,7 @@ unsigned AttributeAST::firstToken() const
}
/** \generated */
-unsigned AttributeAST::lastToken() const
+unsigned GnuAttributeAST::lastToken() const
{
if (rparen_token)
return rparen_token + 1;
@@ -4194,7 +4194,7 @@ unsigned WhileStatementAST::lastToken() const
}
/** \generated */
-unsigned AttributeSpecifierAST::lastToken() const
+unsigned GnuAttributeSpecifierAST::lastToken() const
{
if (second_rparen_token)
return second_rparen_token + 1;
@@ -4524,3 +4524,37 @@ unsigned DotDesignatorAST::lastToken() const
return 1;
}
+/** \generated */
+unsigned AlignmentSpecifierAST::firstToken() const
+{
+ if (align_token)
+ return align_token;
+ if (lparen_token)
+ return lparen_token;
+ if (typeIdExprOrAlignmentExpr)
+ if (unsigned candidate = typeIdExprOrAlignmentExpr->firstToken())
+ return candidate;
+ if (ellipses_token)
+ return ellipses_token;
+ if (rparen_token)
+ return rparen_token;
+ return 0;
+}
+
+/** \generated */
+unsigned AlignmentSpecifierAST::lastToken() const
+{
+ if (rparen_token)
+ return rparen_token + 1;
+ if (ellipses_token)
+ return ellipses_token + 1;
+ if (typeIdExprOrAlignmentExpr)
+ if (unsigned candidate = typeIdExprOrAlignmentExpr->lastToken())
+ return candidate;
+ if (lparen_token)
+ return lparen_token + 1;
+ if (align_token)
+ return align_token + 1;
+ return 1;
+}
+