Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
0ae2d96a
Commit
0ae2d96a
authored
Nov 10, 2009
by
Roberto Raggi
Browse files
Fixed the AST field names.
parent
e5eb88a3
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/CheckUndefinedSymbols.cpp
View file @
0ae2d96a
...
...
@@ -103,7 +103,7 @@ bool CheckUndefinedSymbols::isType(const QByteArray &name) const
for
(
int
i
=
_templateDeclarationStack
.
size
()
-
1
;
i
!=
-
1
;
--
i
)
{
TemplateDeclarationAST
*
templateDeclaration
=
_templateDeclarationStack
.
at
(
i
);
for
(
DeclarationListAST
*
it
=
templateDeclaration
->
template_parameter
s
;
it
;
it
=
it
->
next
)
{
for
(
DeclarationListAST
*
it
=
templateDeclaration
->
template_parameter
_list
;
it
;
it
=
it
->
next
)
{
DeclarationAST
*
templateParameter
=
it
->
value
;
if
(
templateParameterName
(
templateParameter
)
==
name
)
...
...
@@ -424,7 +424,7 @@ bool CheckUndefinedSymbols::visit(CastExpressionAST *ast)
{
if
(
ast
->
lparen_token
&&
ast
->
type_id
&&
ast
->
rparen_token
&&
ast
->
expression
)
{
if
(
TypeIdAST
*
cast_type_id
=
ast
->
type_id
->
asTypeId
())
{
SpecifierListAST
*
type_specifier
=
cast_type_id
->
type_specifier
;
SpecifierListAST
*
type_specifier
=
cast_type_id
->
type_specifier
_list
;
if
(
!
cast_type_id
->
declarator
&&
type_specifier
&&
!
type_specifier
->
next
&&
type_specifier
->
value
->
asNamedTypeSpecifier
()
&&
ast
->
expression
&&
ast
->
expression
->
asUnaryExpression
())
{
...
...
@@ -447,7 +447,7 @@ bool CheckUndefinedSymbols::visit(SizeofExpressionAST *ast)
{
if
(
ast
->
lparen_token
&&
ast
->
expression
&&
ast
->
rparen_token
)
{
if
(
TypeIdAST
*
type_id
=
ast
->
expression
->
asTypeId
())
{
SpecifierListAST
*
type_specifier
=
type_id
->
type_specifier
;
SpecifierListAST
*
type_specifier
=
type_id
->
type_specifier
_list
;
if
(
!
type_id
->
declarator
&&
type_specifier
&&
!
type_specifier
->
next
&&
type_specifier
->
value
->
asNamedTypeSpecifier
())
{
// this sizeof expression is ambiguos, e.g.
...
...
@@ -455,9 +455,9 @@ bool CheckUndefinedSymbols::visit(SizeofExpressionAST *ast)
// `a' can be a typeid or a nested-expression.
return
false
;
}
else
if
(
type_id
->
declarator
&&
type_id
->
declarator
->
postfix_declarator
s
&&
!
type_id
->
declarator
->
postfix_declarator
s
->
next
&&
type_id
->
declarator
->
postfix_declarator
s
->
value
->
asArrayDeclarator
()
!=
0
)
{
&&
type_id
->
declarator
->
postfix_declarator
_list
&&
!
type_id
->
declarator
->
postfix_declarator
_list
->
next
&&
type_id
->
declarator
->
postfix_declarator
_list
->
value
->
asArrayDeclarator
()
!=
0
)
{
// this sizeof expression is ambiguos, e.g.
// sizeof(a[10])
// `a' can be a typeid or an expression.
...
...
src/libs/cplusplus/CppDocument.cpp
View file @
0ae2d96a
...
...
@@ -413,7 +413,7 @@ void Document::check(CheckMode mode)
return
;
// nothing to do.
if
(
TranslationUnitAST
*
ast
=
_translationUnit
->
ast
()
->
asTranslationUnit
())
{
for
(
DeclarationListAST
*
decl
=
ast
->
declaration
s
;
decl
;
decl
=
decl
->
next
)
{
for
(
DeclarationListAST
*
decl
=
ast
->
declaration
_list
;
decl
;
decl
=
decl
->
next
)
{
semantic
.
check
(
decl
->
value
,
globals
);
}
}
else
if
(
ExpressionAST
*
ast
=
_translationUnit
->
ast
()
->
asExpression
())
{
...
...
src/libs/cplusplus/FindUsages.cpp
View file @
0ae2d96a
...
...
@@ -288,7 +288,7 @@ void FindUsages::checkExpression(unsigned startToken, unsigned endToken)
bool
FindUsages
::
visit
(
QualifiedNameAST
*
ast
)
{
for
(
NestedNameSpecifierListAST
*
it
=
ast
->
nested_name_specifier
;
it
;
it
=
it
->
next
)
{
for
(
NestedNameSpecifierListAST
*
it
=
ast
->
nested_name_specifier
_list
;
it
;
it
=
it
->
next
)
{
NestedNameSpecifierAST
*
nested_name_specifier
=
it
->
value
;
if
(
NameAST
*
class_or_namespace_name
=
nested_name_specifier
->
class_or_namespace_name
)
{
...
...
@@ -299,7 +299,7 @@ bool FindUsages::visit(QualifiedNameAST *ast)
template_id
=
class_or_namespace_name
->
asTemplateId
();
if
(
template_id
)
{
for
(
TemplateArgumentListAST
*
arg_it
=
template_id
->
template_argument
s
;
arg_it
;
arg_it
=
arg_it
->
next
)
{
for
(
TemplateArgumentListAST
*
arg_it
=
template_id
->
template_argument
_list
;
arg_it
;
arg_it
=
arg_it
->
next
)
{
accept
(
arg_it
->
value
);
}
}
...
...
@@ -332,7 +332,7 @@ bool FindUsages::visit(QualifiedNameAST *ast)
if
(
template_id
)
{
identifier_token
=
template_id
->
identifier_token
;
for
(
TemplateArgumentListAST
*
template_arguments
=
template_id
->
template_argument
s
;
for
(
TemplateArgumentListAST
*
template_arguments
=
template_id
->
template_argument
_list
;
template_arguments
;
template_arguments
=
template_arguments
->
next
)
{
accept
(
template_arguments
->
value
);
}
...
...
@@ -392,7 +392,7 @@ bool FindUsages::visit(TemplateIdAST *ast)
reportResult
(
ast
->
identifier_token
,
candidates
);
}
for
(
TemplateArgumentListAST
*
template_arguments
=
ast
->
template_argument
s
;
for
(
TemplateArgumentListAST
*
template_arguments
=
ast
->
template_argument
_list
;
template_arguments
;
template_arguments
=
template_arguments
->
next
)
{
accept
(
template_arguments
->
value
);
}
...
...
@@ -402,23 +402,23 @@ bool FindUsages::visit(TemplateIdAST *ast)
bool
FindUsages
::
visit
(
ParameterDeclarationAST
*
ast
)
{
for
(
SpecifierListAST
*
it
=
ast
->
type_specifier
;
it
;
it
=
it
->
next
)
for
(
SpecifierListAST
*
it
=
ast
->
type_specifier
_list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
if
(
DeclaratorAST
*
declarator
=
ast
->
declarator
)
{
for
(
SpecifierListAST
*
it
=
declarator
->
attribute
s
;
it
;
it
=
it
->
next
)
for
(
SpecifierListAST
*
it
=
declarator
->
attribute
_list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
for
(
PtrOperatorListAST
*
it
=
declarator
->
ptr_operator
s
;
it
;
it
=
it
->
next
)
for
(
PtrOperatorListAST
*
it
=
declarator
->
ptr_operator
_list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
if
(
!
_inSimpleDeclaration
)
// visit the core declarator only if we are not in simple-declaration.
accept
(
declarator
->
core_declarator
);
for
(
PostfixDeclaratorListAST
*
it
=
declarator
->
postfix_declarator
s
;
it
;
it
=
it
->
next
)
for
(
PostfixDeclaratorListAST
*
it
=
declarator
->
postfix_declarator
_list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
for
(
SpecifierListAST
*
it
=
declarator
->
post_attribute
s
;
it
;
it
=
it
->
next
)
for
(
SpecifierListAST
*
it
=
declarator
->
post_attribute
_list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
accept
(
declarator
->
initializer
);
...
...
@@ -438,7 +438,7 @@ bool FindUsages::visit(FunctionDeclaratorAST *ast)
{
accept
(
ast
->
parameters
);
for
(
SpecifierListAST
*
it
=
ast
->
cv_qualifier_
seq
;
it
;
it
=
it
->
next
)
for
(
SpecifierListAST
*
it
=
ast
->
cv_qualifier_
list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
accept
(
ast
->
exception_specification
);
...
...
src/libs/cplusplus/ResolveExpression.cpp
View file @
0ae2d96a
...
...
@@ -170,8 +170,8 @@ bool ResolveExpression::visit(NewExpressionAST *ast)
{
if
(
ast
->
new_type_id
)
{
Scope
*
scope
=
_context
.
expressionDocument
()
->
globalSymbols
();
FullySpecifiedType
ty
=
sem
.
check
(
ast
->
new_type_id
->
type_specifier
,
scope
);
ty
=
sem
.
check
(
ast
->
new_type_id
->
ptr_operator
s
,
ty
,
scope
);
FullySpecifiedType
ty
=
sem
.
check
(
ast
->
new_type_id
->
type_specifier
_list
,
scope
);
ty
=
sem
.
check
(
ast
->
new_type_id
->
ptr_operator
_list
,
ty
,
scope
);
FullySpecifiedType
ptrTy
(
control
()
->
pointerType
(
ty
));
addResult
(
ptrTy
);
}
...
...
@@ -208,7 +208,7 @@ bool ResolveExpression::visit(PostfixExpressionAST *ast)
{
accept
(
ast
->
base_expression
);
for
(
PostfixListAST
*
it
=
ast
->
postfix_expression
s
;
it
;
it
=
it
->
next
)
{
for
(
PostfixListAST
*
it
=
ast
->
postfix_expression
_list
;
it
;
it
=
it
->
next
)
{
accept
(
it
->
value
);
}
...
...
src/plugins/cppeditor/cppeditor.cpp
View file @
0ae2d96a
...
...
@@ -239,7 +239,7 @@ protected:
return
;
else
if
(
TemplateIdAST
*
template_id
=
name
->
asTemplateId
())
{
for
(
TemplateArgumentListAST
*
it
=
template_id
->
template_argument
s
;
it
;
it
=
it
->
next
)
{
for
(
TemplateArgumentListAST
*
it
=
template_id
->
template_argument
_list
;
it
;
it
=
it
->
next
)
{
accept
(
it
->
value
);
}
}
...
...
@@ -276,7 +276,7 @@ protected:
virtual
bool
visit
(
TemplateIdAST
*
ast
)
{
for
(
TemplateArgumentListAST
*
arg
=
ast
->
template_argument
s
;
arg
;
arg
=
arg
->
next
)
for
(
TemplateArgumentListAST
*
arg
=
ast
->
template_argument
_list
;
arg
;
arg
=
arg
->
next
)
accept
(
arg
->
value
);
unsigned
line
,
column
;
...
...
@@ -308,7 +308,7 @@ protected:
virtual
bool
visit
(
QualifiedNameAST
*
ast
)
{
for
(
NestedNameSpecifierListAST
*
it
=
ast
->
nested_name_specifier
;
it
;
it
=
it
->
next
)
for
(
NestedNameSpecifierListAST
*
it
=
ast
->
nested_name_specifier
_list
;
it
;
it
=
it
->
next
)
searchUsesInTemplateArguments
(
it
->
value
->
class_or_namespace_name
);
searchUsesInTemplateArguments
(
ast
->
unqualified_name
);
...
...
@@ -318,7 +318,7 @@ protected:
virtual
bool
visit
(
PostfixExpressionAST
*
ast
)
{
accept
(
ast
->
base_expression
);
for
(
PostfixListAST
*
it
=
ast
->
postfix_expression
s
;
it
;
it
=
it
->
next
)
{
for
(
PostfixListAST
*
it
=
ast
->
postfix_expression
_list
;
it
;
it
=
it
->
next
)
{
PostfixAST
*
fx
=
it
->
value
;
if
(
fx
->
asMemberAccess
()
!=
0
)
continue
;
// skip members
...
...
@@ -366,7 +366,7 @@ protected:
{
accept
(
ast
->
parameters
);
for
(
SpecifierListAST
*
it
=
ast
->
cv_qualifier_
seq
;
it
;
it
=
it
->
next
)
for
(
SpecifierListAST
*
it
=
ast
->
cv_qualifier_
list
;
it
;
it
=
it
->
next
)
accept
(
it
->
value
);
accept
(
ast
->
exception_specification
);
...
...
@@ -439,7 +439,7 @@ public:
if
(
ast
)
{
if
(
ast
->
declarator
)
{
_visitFunctionDeclarator
=
true
;
accept
(
ast
->
declarator
->
postfix_declarator
s
);
accept
(
ast
->
declarator
->
postfix_declarator
_list
);
}
_visitFunctionDeclarator
=
false
;
...
...
src/plugins/cpptools/cppcodecompletion.cpp
View file @
0ae2d96a
...
...
@@ -1072,8 +1072,8 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList<TypeOfExpressi
if
(
doc
->
parse
(
Document
::
ParseDeclaration
))
{
doc
->
check
();
if
(
SimpleDeclarationAST
*
sd
=
doc
->
translationUnit
()
->
ast
()
->
asSimpleDeclaration
())
{
if
(
sd
->
declarator
s
->
value
->
postfix_declarator
s
&&
sd
->
declarator
s
->
value
->
postfix_declarator
s
->
value
->
asFunctionDeclarator
())
{
if
(
sd
->
declarator
_list
&&
sd
->
declarator_list
->
value
->
postfix_declarator
_list
&&
sd
->
declarator
_list
->
value
->
postfix_declarator
_list
->
value
->
asFunctionDeclarator
())
{
autocompleteSignature
=
true
;
}
}
...
...
src/shared/cplusplus/AST.cpp
View file @
0ae2d96a
This diff is collapsed.
Click to expand it.
src/shared/cplusplus/AST.h
View file @
0ae2d96a
...
...
@@ -286,7 +286,7 @@ public:
unsigned
attribute_token
;
unsigned
first_lparen_token
;
unsigned
second_lparen_token
;
AttributeListAST
*
attribute
s
;
AttributeListAST
*
attribute
_list
;
unsigned
first_rparen_token
;
unsigned
second_rparen_token
;
...
...
@@ -370,11 +370,11 @@ public:
class
CPLUSPLUS_EXPORT
DeclaratorAST
:
public
AST
{
public:
SpecifierListAST
*
attribute
s
;
PtrOperatorListAST
*
ptr_operator
s
;
SpecifierListAST
*
attribute
_list
;
PtrOperatorListAST
*
ptr_operator
_list
;
CoreDeclaratorAST
*
core_declarator
;
PostfixDeclaratorListAST
*
postfix_declarator
s
;
SpecifierListAST
*
post_attribute
s
;
PostfixDeclaratorListAST
*
postfix_declarator
_list
;
SpecifierListAST
*
post_attribute
_list
;
unsigned
equals_token
;
ExpressionAST
*
initializer
;
...
...
@@ -392,8 +392,8 @@ class CPLUSPLUS_EXPORT SimpleDeclarationAST: public DeclarationAST
{
public:
unsigned
qt_invokable_token
;
SpecifierListAST
*
decl_specifier_
seq
;
DeclaratorListAST
*
declarator
s
;
SpecifierListAST
*
decl_specifier_
list
;
DeclaratorListAST
*
declarator
_list
;
unsigned
semicolon_token
;
public:
...
...
@@ -557,12 +557,12 @@ class CPLUSPLUS_EXPORT ClassSpecifierAST: public SpecifierAST
{
public:
unsigned
classkey_token
;
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
NameAST
*
name
;
unsigned
colon_token
;
BaseSpecifierListAST
*
base_clause_list
;
unsigned
lbrace_token
;
DeclarationListAST
*
member_specifier
s
;
DeclarationListAST
*
member_specifier
_list
;
unsigned
rbrace_token
;
public:
// annotations
...
...
@@ -600,7 +600,7 @@ class CPLUSPLUS_EXPORT CompoundStatementAST: public StatementAST
{
public:
unsigned
lbrace_token
;
StatementListAST
*
statement
s
;
StatementListAST
*
statement
_list
;
unsigned
rbrace_token
;
public:
// annotations
...
...
@@ -619,7 +619,7 @@ protected:
class
CPLUSPLUS_EXPORT
ConditionAST
:
public
ExpressionAST
{
public:
SpecifierListAST
*
type_specifier
s
;
SpecifierListAST
*
type_specifier
_list
;
DeclaratorAST
*
declarator
;
public:
...
...
@@ -676,7 +676,7 @@ class CPLUSPLUS_EXPORT CtorInitializerAST: public AST
{
public:
unsigned
colon_token
;
MemInitializerListAST
*
member_initializer
s
;
MemInitializerListAST
*
member_initializer
_list
;
public:
virtual
CtorInitializerAST
*
asCtorInitializer
()
{
return
this
;
}
...
...
@@ -741,7 +741,7 @@ public:
unsigned
lparen_token
;
ParameterDeclarationClauseAST
*
parameters
;
unsigned
rparen_token
;
SpecifierListAST
*
cv_qualifier_
seq
;
SpecifierListAST
*
cv_qualifier_
list
;
ExceptionSpecificationAST
*
exception_specification
;
ExpressionAST
*
as_cpp_initializer
;
...
...
@@ -852,7 +852,7 @@ public:
unsigned
enum_token
;
NameAST
*
name
;
unsigned
lbrace_token
;
EnumeratorListAST
*
enumerator
s
;
EnumeratorListAST
*
enumerator
_list
;
unsigned
rbrace_token
;
public:
...
...
@@ -885,7 +885,7 @@ protected:
class
CPLUSPLUS_EXPORT
ExceptionDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
type_specifier
;
SpecifierListAST
*
type_specifier
_list
;
DeclaratorAST
*
declarator
;
unsigned
dot_dot_dot_token
;
...
...
@@ -905,7 +905,7 @@ public:
unsigned
throw_token
;
unsigned
lparen_token
;
unsigned
dot_dot_dot_token
;
ExpressionListAST
*
type_id
s
;
ExpressionListAST
*
type_id
_list
;
unsigned
rparen_token
;
public:
...
...
@@ -954,7 +954,7 @@ class CPLUSPLUS_EXPORT FunctionDefinitionAST: public DeclarationAST
{
public:
unsigned
qt_invokable_token
;
SpecifierListAST
*
decl_specifier_
seq
;
SpecifierListAST
*
decl_specifier_
list
;
DeclaratorAST
*
declarator
;
CtorInitializerAST
*
ctor_initializer
;
StatementAST
*
function_body
;
...
...
@@ -978,7 +978,7 @@ public:
unsigned
foreach_token
;
unsigned
lparen_token
;
// declaration
SpecifierListAST
*
type_specifier
s
;
SpecifierListAST
*
type_specifier
_list
;
DeclaratorAST
*
declarator
;
// or an expression
ExpressionAST
*
initializer
;
...
...
@@ -1087,7 +1087,7 @@ class CPLUSPLUS_EXPORT LinkageBodyAST: public DeclarationAST
{
public:
unsigned
lbrace_token
;
DeclarationListAST
*
declaration
s
;
DeclarationListAST
*
declaration
_list
;
unsigned
rbrace_token
;
public:
...
...
@@ -1164,7 +1164,7 @@ class CPLUSPLUS_EXPORT QualifiedNameAST: public NameAST
{
public:
unsigned
global_scope_token
;
NestedNameSpecifierListAST
*
nested_name_specifier
;
NestedNameSpecifierListAST
*
nested_name_specifier
_list
;
NameAST
*
unqualified_name
;
public:
...
...
@@ -1197,8 +1197,8 @@ class CPLUSPLUS_EXPORT ConversionFunctionIdAST: public NameAST
{
public:
unsigned
operator_token
;
SpecifierListAST
*
type_specifier
;
PtrOperatorListAST
*
ptr_operator
s
;
SpecifierListAST
*
type_specifier
_list
;
PtrOperatorListAST
*
ptr_operator
_list
;
public:
virtual
ConversionFunctionIdAST
*
asConversionFunctionId
()
{
return
this
;
}
...
...
@@ -1246,7 +1246,7 @@ class CPLUSPLUS_EXPORT TemplateIdAST: public NameAST
public:
unsigned
identifier_token
;
unsigned
less_token
;
TemplateArgumentListAST
*
template_argument
s
;
TemplateArgumentListAST
*
template_argument
_list
;
unsigned
greater_token
;
public:
...
...
@@ -1264,7 +1264,7 @@ class CPLUSPLUS_EXPORT NamespaceAST: public DeclarationAST
public:
unsigned
namespace_token
;
unsigned
identifier_token
;
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
DeclarationAST
*
linkage_body
;
public:
// annotations
...
...
@@ -1378,9 +1378,9 @@ protected:
class
CPLUSPLUS_EXPORT
NewTypeIdAST
:
public
AST
{
public:
SpecifierListAST
*
type_specifier
;
PtrOperatorListAST
*
ptr_operator
s
;
NewArrayDeclaratorListAST
*
new_array_declarator
s
;
SpecifierListAST
*
type_specifier
_list
;
PtrOperatorListAST
*
ptr_operator
_list
;
NewArrayDeclaratorListAST
*
new_array_declarator
_list
;
public:
virtual
NewTypeIdAST
*
asNewTypeId
()
{
return
this
;
}
...
...
@@ -1412,7 +1412,7 @@ protected:
class
CPLUSPLUS_EXPORT
ParameterDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
type_specifier
;
SpecifierListAST
*
type_specifier
_list
;
DeclaratorAST
*
declarator
;
unsigned
equal_token
;
ExpressionAST
*
expression
;
...
...
@@ -1433,7 +1433,7 @@ protected:
class
CPLUSPLUS_EXPORT
ParameterDeclarationClauseAST
:
public
AST
{
public:
DeclarationListAST
*
parameter_declaration
s
;
DeclarationListAST
*
parameter_declaration
_list
;
unsigned
dot_dot_dot_token
;
public:
...
...
@@ -1558,7 +1558,7 @@ protected:
class
CPLUSPLUS_EXPORT
TypeConstructorCallAST
:
public
ExpressionAST
{
public:
SpecifierListAST
*
type_specifier
;
SpecifierListAST
*
type_specifier
_list
;
unsigned
lparen_token
;
ExpressionListAST
*
expression_list
;
unsigned
rparen_token
;
...
...
@@ -1577,7 +1577,7 @@ class CPLUSPLUS_EXPORT PostfixExpressionAST: public ExpressionAST
{
public:
ExpressionAST
*
base_expression
;
PostfixListAST
*
postfix_expression
s
;
PostfixListAST
*
postfix_expression
_list
;
public:
virtual
PostfixExpressionAST
*
asPostfixExpression
()
{
return
this
;
}
...
...
@@ -1599,9 +1599,9 @@ class CPLUSPLUS_EXPORT PointerToMemberAST: public PtrOperatorAST
{
public:
unsigned
global_scope_token
;
NestedNameSpecifierListAST
*
nested_name_specifier
;
NestedNameSpecifierListAST
*
nested_name_specifier
_list
;
unsigned
star_token
;
SpecifierListAST
*
cv_qualifier_
seq
;
SpecifierListAST
*
cv_qualifier_
list
;
public:
virtual
PointerToMemberAST
*
asPointerToMember
()
{
return
this
;
}
...
...
@@ -1617,7 +1617,7 @@ class CPLUSPLUS_EXPORT PointerAST: public PtrOperatorAST
{
public:
unsigned
star_token
;
SpecifierListAST
*
cv_qualifier_
seq
;
SpecifierListAST
*
cv_qualifier_
list
;
public:
virtual
PointerAST
*
asPointer
()
{
return
this
;
}
...
...
@@ -1834,7 +1834,7 @@ public:
unsigned
export_token
;
unsigned
template_token
;
unsigned
less_token
;
DeclarationListAST
*
template_parameter
s
;
DeclarationListAST
*
template_parameter
_list
;
unsigned
greater_token
;
DeclarationAST
*
declaration
;
...
...
@@ -1867,7 +1867,7 @@ protected:
class
CPLUSPLUS_EXPORT
TranslationUnitAST
:
public
AST
{
public:
DeclarationListAST
*
declaration
s
;
DeclarationListAST
*
declaration
_list
;
public:
virtual
TranslationUnitAST
*
asTranslationUnit
()
{
return
this
;
}
...
...
@@ -1921,7 +1921,7 @@ protected:
class
CPLUSPLUS_EXPORT
TypeIdAST
:
public
ExpressionAST
{
public:
SpecifierListAST
*
type_specifier
;
SpecifierListAST
*
type_specifier
_list
;
DeclaratorAST
*
declarator
;
public:
...
...
@@ -1960,7 +1960,7 @@ class CPLUSPLUS_EXPORT TemplateTypeParameterAST: public DeclarationAST
public:
unsigned
template_token
;
unsigned
less_token
;
DeclarationListAST
*
template_parameter
s
;
DeclarationListAST
*
template_parameter
_list
;
unsigned
greater_token
;
unsigned
class_token
;
NameAST
*
name
;
...
...
@@ -2063,7 +2063,7 @@ protected:
class
CPLUSPLUS_EXPORT
ObjCClassForwardDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
unsigned
class_token
;
ObjCIdentifierListAST
*
identifier_list
;
unsigned
semicolon_token
;
...
...
@@ -2084,7 +2084,7 @@ protected:
class
CPLUSPLUS_EXPORT
ObjCClassDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
unsigned
interface_token
;
unsigned
implementation_token
;
NameAST
*
class_name
;
...
...
@@ -2095,7 +2095,7 @@ public:
NameAST
*
superclass
;
ObjCProtocolRefsAST
*
protocol_refs
;
ObjCInstanceVariablesDeclarationAST
*
inst_vars_decl
;
DeclarationListAST
*
member_declaration
s
;
DeclarationListAST
*
member_declaration
_list
;
unsigned
end_token
;
public:
// annotations
...
...
@@ -2114,7 +2114,7 @@ protected:
class
CPLUSPLUS_EXPORT
ObjCProtocolForwardDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
unsigned
protocol_token
;
ObjCIdentifierListAST
*
identifier_list
;
unsigned
semicolon_token
;
...
...
@@ -2135,11 +2135,11 @@ protected:
class
CPLUSPLUS_EXPORT
ObjCProtocolDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
unsigned
protocol_token
;
NameAST
*
name
;
ObjCProtocolRefsAST
*
protocol_refs
;
DeclarationListAST
*
member_declaration
s
;
DeclarationListAST
*
member_declaration
_list
;
unsigned
end_token
;
public:
// annotations
...
...
@@ -2302,7 +2302,7 @@ protected:
class
CPLUSPLUS_EXPORT
ObjCSelectorWithArgumentsAST
:
public
ObjCSelectorAST
{
public:
ObjCSelectorArgumentListAST
*
selector_argument
s
;
ObjCSelectorArgumentListAST
*
selector_argument
_list
;
public:
virtual
ObjCSelectorWithArgumentsAST
*
asObjCSelectorWithArguments
()
{
return
this
;
}
...
...
@@ -2336,7 +2336,7 @@ class CPLUSPLUS_EXPORT ObjCInstanceVariablesDeclarationAST: public AST
{
public:
unsigned
lbrace_token
;
DeclarationListAST
*
instance_variable
s
;
DeclarationListAST
*
instance_variable
_list
;
unsigned
rbrace_token
;
public:
...
...
@@ -2384,10 +2384,10 @@ protected:
class
CPLUSPLUS_EXPORT
ObjCPropertyDeclarationAST
:
public
DeclarationAST
{
public:
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
unsigned
property_token
;
unsigned
lparen_token
;
ObjCPropertyAttributeListAST
*
property_attribute
s
;
ObjCPropertyAttributeListAST
*
property_attribute
_list
;
unsigned
rparen_token
;
DeclarationAST
*
simple_declaration
;
...
...
@@ -2405,7 +2405,7 @@ class CPLUSPLUS_EXPORT ObjCMessageArgumentDeclarationAST: public NameAST
{
public:
ObjCTypeNameAST
*
type_name
;
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
unsigned
param_name_token
;
public:
// annotations
...
...
@@ -2427,9 +2427,9 @@ public:
unsigned
method_type_token
;
ObjCTypeNameAST
*
type_name
;
ObjCSelectorAST
*
selector
;
ObjCMessageArgumentDeclarationListAST
*
argument
s
;
ObjCMessageArgumentDeclarationListAST
*
argument
_list
;
unsigned
dot_dot_dot_token
;
SpecifierListAST
*
attribute
s
;
SpecifierListAST
*
attribute
_list
;
public:
// annotations
ObjCMethod
*
symbol
;
...
...
@@ -2482,7 +2482,7 @@ class CPLUSPLUS_EXPORT ObjCSynthesizedPropertiesDeclarationAST: public Declarati
{
public:
unsigned
synthesized_token
;
ObjCSynthesizedPropertyListAST
*
property_identifier
s
;
ObjCSynthesizedPropertyListAST
*
property_identifier
_list
;
unsigned
semicolon_token
;
public:
...
...
@@ -2499,7 +2499,7 @@ class CPLUSPLUS_EXPORT ObjCDynamicPropertiesDeclarationAST: public DeclarationAS
{
public:
unsigned
dynamic_token
;
ObjCIdentifierListAST
*
property_identifier
s
;
ObjCIdentifierListAST
*
property_identifier
_list
;
unsigned
semicolon_token
;
public:
...
...
@@ -2519,7 +2519,7 @@ public:
unsigned
lparen_token
;
// declaration
SpecifierListAST
*
type_specifier
s
;
SpecifierListAST
*
type_specifier
_list
;
DeclaratorAST
*
declarator
;
// or an expression
ExpressionAST
*
initializer
;
...
...
src/shared/cplusplus/ASTVisit.cpp
View file @
0ae2d96a
...
...
@@ -42,7 +42,7 @@ void SimpleSpecifierAST::accept0(ASTVisitor *visitor)
void
AttributeSpecifierAST
::
accept0
(
ASTVisitor
*
visitor
)
{
if
(
visitor
->
visit
(
this
))
{
accept
(
attribute
s
,
visitor
);
accept
(
attribute
_list
,
visitor
);
}
visitor
->
endVisit
(
this
);
}
...
...
@@ -66,11 +66,11 @@ void TypeofSpecifierAST::accept0(ASTVisitor *visitor)
void
DeclaratorAST
::
accept0
(
ASTVisitor
*
visitor
)
{
if
(
visitor
->
visit
(
this
))
{
accept
(
attribute
s
,
visitor
);
accept
(
ptr_operator
s
,
visitor
);
accept
(
attribute
_list
,
visitor
);