forked from qt-creator/qt-creator
Fixed the AST field names.
This commit is contained in:
@@ -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_parameters; 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_declarators
|
||||
&& ! type_id->declarator->postfix_declarators->next
|
||||
&& type_id->declarator->postfix_declarators->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.
|
||||
|
||||
@@ -413,7 +413,7 @@ void Document::check(CheckMode mode)
|
||||
return; // nothing to do.
|
||||
|
||||
if (TranslationUnitAST *ast = _translationUnit->ast()->asTranslationUnit()) {
|
||||
for (DeclarationListAST *decl = ast->declarations; 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()) {
|
||||
|
||||
@@ -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_arguments; 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_arguments;
|
||||
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_arguments;
|
||||
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->attributes; it; it = it->next)
|
||||
for (SpecifierListAST *it = declarator->attribute_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
for (PtrOperatorListAST *it = declarator->ptr_operators; 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_declarators; it; it = it->next)
|
||||
for (PostfixDeclaratorListAST *it = declarator->postfix_declarator_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
for (SpecifierListAST *it = declarator->post_attributes; 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);
|
||||
|
||||
@@ -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_operators, 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_expressions; it; it = it->next) {
|
||||
for (PostfixListAST *it = ast->postfix_expression_list; it; it = it->next) {
|
||||
accept(it->value);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ protected:
|
||||
return;
|
||||
|
||||
else if (TemplateIdAST *template_id = name->asTemplateId()) {
|
||||
for (TemplateArgumentListAST *it = template_id->template_arguments; 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_arguments; 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_expressions; 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_declarators);
|
||||
accept(ast->declarator->postfix_declarator_list);
|
||||
}
|
||||
|
||||
_visitFunctionDeclarator = false;
|
||||
|
||||
@@ -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->declarators->value->postfix_declarators
|
||||
&& sd->declarators->value->postfix_declarators->value->asFunctionDeclarator()) {
|
||||
if (sd->declarator_list && sd->declarator_list->value->postfix_declarator_list
|
||||
&& sd->declarator_list->value->postfix_declarator_list->value->asFunctionDeclarator()) {
|
||||
autocompleteSignature = true;
|
||||
}
|
||||
}
|
||||
|
||||
+133
-133
@@ -80,8 +80,8 @@ unsigned AttributeSpecifierAST::lastToken() const
|
||||
return second_rparen_token + 1;
|
||||
else if (first_rparen_token)
|
||||
return first_rparen_token + 1;
|
||||
else if (attributes)
|
||||
return attributes->lastToken();
|
||||
else if (attribute_list)
|
||||
return attribute_list->lastToken();
|
||||
else if (second_lparen_token)
|
||||
return second_lparen_token + 1;
|
||||
else if (first_lparen_token)
|
||||
@@ -369,8 +369,8 @@ unsigned ClassSpecifierAST::lastToken() const
|
||||
if (rbrace_token)
|
||||
return rbrace_token + 1;
|
||||
|
||||
else if (member_specifiers)
|
||||
return member_specifiers->lastToken();
|
||||
else if (member_specifier_list)
|
||||
return member_specifier_list->lastToken();
|
||||
|
||||
else if (lbrace_token)
|
||||
return lbrace_token + 1;
|
||||
@@ -384,8 +384,8 @@ unsigned ClassSpecifierAST::lastToken() const
|
||||
else if (name)
|
||||
return name->lastToken();
|
||||
|
||||
else if (attributes)
|
||||
return attributes->lastToken();
|
||||
else if (attribute_list)
|
||||
return attribute_list->lastToken();
|
||||
|
||||
return classkey_token + 1;
|
||||
}
|
||||
@@ -400,8 +400,8 @@ unsigned CompoundStatementAST::lastToken() const
|
||||
if (rbrace_token)
|
||||
return rbrace_token + 1;
|
||||
|
||||
else if (statements)
|
||||
return statements->lastToken();
|
||||
else if (statement_list)
|
||||
return statement_list->lastToken();
|
||||
|
||||
return lbrace_token + 1;
|
||||
}
|
||||
@@ -409,8 +409,8 @@ unsigned CompoundStatementAST::lastToken() const
|
||||
|
||||
unsigned ConditionAST::firstToken() const
|
||||
{
|
||||
if (type_specifiers)
|
||||
return type_specifiers->firstToken();
|
||||
if (type_specifier_list)
|
||||
return type_specifier_list->firstToken();
|
||||
|
||||
return declarator->firstToken();
|
||||
}
|
||||
@@ -420,8 +420,8 @@ unsigned ConditionAST::lastToken() const
|
||||
if (declarator)
|
||||
return declarator->lastToken();
|
||||
|
||||
else if (type_specifiers)
|
||||
return type_specifiers->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
// ### assert?
|
||||
return 0;
|
||||
@@ -470,11 +470,11 @@ unsigned ConversionFunctionIdAST::firstToken() const
|
||||
|
||||
unsigned ConversionFunctionIdAST::lastToken() const
|
||||
{
|
||||
if (ptr_operators)
|
||||
return ptr_operators->lastToken();
|
||||
if (ptr_operator_list)
|
||||
return ptr_operator_list->lastToken();
|
||||
|
||||
else if (type_specifier)
|
||||
return type_specifier->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
return operator_token + 1;
|
||||
}
|
||||
@@ -510,23 +510,23 @@ unsigned CtorInitializerAST::firstToken() const
|
||||
|
||||
unsigned CtorInitializerAST::lastToken() const
|
||||
{
|
||||
if (member_initializers)
|
||||
return member_initializers->lastToken();
|
||||
if (member_initializer_list)
|
||||
return member_initializer_list->lastToken();
|
||||
return colon_token + 1;
|
||||
}
|
||||
|
||||
unsigned DeclaratorAST::firstToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->firstToken();
|
||||
if (ptr_operators)
|
||||
return ptr_operators->firstToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
if (ptr_operator_list)
|
||||
return ptr_operator_list->firstToken();
|
||||
else if (core_declarator)
|
||||
return core_declarator->firstToken();
|
||||
else if (postfix_declarators)
|
||||
return postfix_declarators->firstToken();
|
||||
else if (attributes)
|
||||
return attributes->firstToken();
|
||||
else if (postfix_declarator_list)
|
||||
return postfix_declarator_list->firstToken();
|
||||
else if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
else if (initializer)
|
||||
return initializer->firstToken();
|
||||
// ### assert?
|
||||
@@ -538,20 +538,20 @@ unsigned DeclaratorAST::lastToken() const
|
||||
if (initializer)
|
||||
return initializer->lastToken();
|
||||
|
||||
else if (post_attributes)
|
||||
return post_attributes->lastToken();
|
||||
else if (post_attribute_list)
|
||||
return post_attribute_list->lastToken();
|
||||
|
||||
else if (postfix_declarators)
|
||||
return postfix_declarators->lastToken();
|
||||
else if (postfix_declarator_list)
|
||||
return postfix_declarator_list->lastToken();
|
||||
|
||||
else if (core_declarator)
|
||||
return core_declarator->lastToken();
|
||||
|
||||
else if (ptr_operators)
|
||||
return ptr_operators->lastToken();
|
||||
else if (ptr_operator_list)
|
||||
return ptr_operator_list->lastToken();
|
||||
|
||||
else if (attributes)
|
||||
return attributes->lastToken();
|
||||
else if (attribute_list)
|
||||
return attribute_list->lastToken();
|
||||
|
||||
// ### assert?
|
||||
return 0;
|
||||
@@ -670,8 +670,8 @@ unsigned EnumSpecifierAST::lastToken() const
|
||||
if (rbrace_token)
|
||||
return rbrace_token + 1;
|
||||
|
||||
if (enumerators)
|
||||
return enumerators->lastToken();
|
||||
if (enumerator_list)
|
||||
return enumerator_list->lastToken();
|
||||
|
||||
if (lbrace_token)
|
||||
return lbrace_token + 1;
|
||||
@@ -699,8 +699,8 @@ unsigned EnumeratorAST::lastToken() const
|
||||
|
||||
unsigned ExceptionDeclarationAST::firstToken() const
|
||||
{
|
||||
if (type_specifier)
|
||||
return type_specifier->firstToken();
|
||||
if (type_specifier_list)
|
||||
return type_specifier_list->firstToken();
|
||||
if (declarator)
|
||||
return declarator->firstToken();
|
||||
return dot_dot_dot_token;
|
||||
@@ -714,8 +714,8 @@ unsigned ExceptionDeclarationAST::lastToken() const
|
||||
else if (declarator)
|
||||
return declarator->lastToken();
|
||||
|
||||
else if (type_specifier)
|
||||
return type_specifier->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -731,8 +731,8 @@ unsigned ExceptionSpecificationAST::lastToken() const
|
||||
if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
|
||||
else if (type_ids)
|
||||
return type_ids->lastToken();
|
||||
else if (type_id_list)
|
||||
return type_id_list->lastToken();
|
||||
|
||||
else if (dot_dot_dot_token)
|
||||
return dot_dot_dot_token + 1;
|
||||
@@ -826,8 +826,8 @@ unsigned FunctionDeclaratorAST::lastToken() const
|
||||
if (exception_specification)
|
||||
return exception_specification->lastToken();
|
||||
|
||||
else if (cv_qualifier_seq)
|
||||
return cv_qualifier_seq->lastToken();
|
||||
else if (cv_qualifier_list)
|
||||
return cv_qualifier_list->lastToken();
|
||||
|
||||
else if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
@@ -841,8 +841,8 @@ unsigned FunctionDeclaratorAST::lastToken() const
|
||||
|
||||
unsigned FunctionDefinitionAST::firstToken() const
|
||||
{
|
||||
if (decl_specifier_seq)
|
||||
return decl_specifier_seq->firstToken();
|
||||
if (decl_specifier_list)
|
||||
return decl_specifier_list->firstToken();
|
||||
else if (declarator)
|
||||
return declarator->firstToken();
|
||||
else if (ctor_initializer)
|
||||
@@ -861,8 +861,8 @@ unsigned FunctionDefinitionAST::lastToken() const
|
||||
else if (declarator)
|
||||
return declarator->lastToken();
|
||||
|
||||
else if (decl_specifier_seq)
|
||||
return decl_specifier_seq->lastToken();
|
||||
else if (decl_specifier_list)
|
||||
return decl_specifier_list->lastToken();
|
||||
|
||||
// ### assert
|
||||
return 0;
|
||||
@@ -934,8 +934,8 @@ unsigned LinkageBodyAST::lastToken() const
|
||||
if (rbrace_token)
|
||||
return rbrace_token + 1;
|
||||
|
||||
else if (declarations)
|
||||
return declarations->lastToken();
|
||||
else if (declaration_list)
|
||||
return declaration_list->lastToken();
|
||||
|
||||
return lbrace_token + 1;
|
||||
}
|
||||
@@ -1010,8 +1010,8 @@ unsigned NamespaceAST::lastToken() const
|
||||
if (linkage_body)
|
||||
return linkage_body->lastToken();
|
||||
|
||||
else if (attributes)
|
||||
return attributes->lastToken();
|
||||
else if (attribute_list)
|
||||
return attribute_list->lastToken();
|
||||
|
||||
else if (identifier_token)
|
||||
return identifier_token + 1;
|
||||
@@ -1140,19 +1140,19 @@ unsigned NewInitializerAST::lastToken() const
|
||||
|
||||
unsigned NewTypeIdAST::firstToken() const
|
||||
{
|
||||
return type_specifier->firstToken();
|
||||
return type_specifier_list->firstToken();
|
||||
}
|
||||
|
||||
unsigned NewTypeIdAST::lastToken() const
|
||||
{
|
||||
if (new_array_declarators)
|
||||
return new_array_declarators->lastToken();
|
||||
if (new_array_declarator_list)
|
||||
return new_array_declarator_list->lastToken();
|
||||
|
||||
else if (ptr_operators)
|
||||
return ptr_operators->lastToken();
|
||||
else if (ptr_operator_list)
|
||||
return ptr_operator_list->lastToken();
|
||||
|
||||
else if (type_specifier)
|
||||
return type_specifier->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
// ### assert?
|
||||
return 0;
|
||||
@@ -1200,7 +1200,7 @@ unsigned OperatorFunctionIdAST::lastToken() const
|
||||
|
||||
unsigned ParameterDeclarationAST::firstToken() const
|
||||
{
|
||||
return type_specifier->firstToken();
|
||||
return type_specifier_list->firstToken();
|
||||
}
|
||||
|
||||
unsigned ParameterDeclarationAST::lastToken() const
|
||||
@@ -1214,8 +1214,8 @@ unsigned ParameterDeclarationAST::lastToken() const
|
||||
else if (declarator)
|
||||
return declarator->lastToken();
|
||||
|
||||
else if (type_specifier)
|
||||
return type_specifier->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
// ### assert?
|
||||
return 0;
|
||||
@@ -1224,8 +1224,8 @@ unsigned ParameterDeclarationAST::lastToken() const
|
||||
|
||||
unsigned ParameterDeclarationClauseAST::firstToken() const
|
||||
{
|
||||
if (parameter_declarations)
|
||||
return parameter_declarations->firstToken();
|
||||
if (parameter_declaration_list)
|
||||
return parameter_declaration_list->firstToken();
|
||||
return dot_dot_dot_token;
|
||||
}
|
||||
|
||||
@@ -1233,7 +1233,7 @@ unsigned ParameterDeclarationClauseAST::lastToken() const
|
||||
{
|
||||
if (dot_dot_dot_token)
|
||||
return dot_dot_dot_token + 1;
|
||||
return parameter_declarations->lastToken();
|
||||
return parameter_declaration_list->lastToken();
|
||||
}
|
||||
|
||||
|
||||
@@ -1244,8 +1244,8 @@ unsigned PointerAST::firstToken() const
|
||||
|
||||
unsigned PointerAST::lastToken() const
|
||||
{
|
||||
if (cv_qualifier_seq)
|
||||
return cv_qualifier_seq->lastToken();
|
||||
if (cv_qualifier_list)
|
||||
return cv_qualifier_list->lastToken();
|
||||
|
||||
return star_token + 1;
|
||||
}
|
||||
@@ -1255,21 +1255,21 @@ unsigned PointerToMemberAST::firstToken() const
|
||||
{
|
||||
if (global_scope_token)
|
||||
return global_scope_token;
|
||||
else if (nested_name_specifier)
|
||||
return nested_name_specifier->firstToken();
|
||||
else if (nested_name_specifier_list)
|
||||
return nested_name_specifier_list->firstToken();
|
||||
return star_token;
|
||||
}
|
||||
|
||||
unsigned PointerToMemberAST::lastToken() const
|
||||
{
|
||||
if (cv_qualifier_seq)
|
||||
return cv_qualifier_seq->lastToken();
|
||||
if (cv_qualifier_list)
|
||||
return cv_qualifier_list->lastToken();
|
||||
|
||||
else if (star_token)
|
||||
return star_token + 1;
|
||||
|
||||
else if (nested_name_specifier)
|
||||
return nested_name_specifier->lastToken();
|
||||
else if (nested_name_specifier_list)
|
||||
return nested_name_specifier_list->lastToken();
|
||||
|
||||
else if (global_scope_token)
|
||||
return global_scope_token + 1;
|
||||
@@ -1297,8 +1297,8 @@ unsigned PostfixExpressionAST::firstToken() const
|
||||
|
||||
unsigned PostfixExpressionAST::lastToken() const
|
||||
{
|
||||
if (postfix_expressions)
|
||||
return postfix_expressions->lastToken();
|
||||
if (postfix_expression_list)
|
||||
return postfix_expression_list->lastToken();
|
||||
return base_expression->lastToken();
|
||||
}
|
||||
|
||||
@@ -1307,8 +1307,8 @@ unsigned QualifiedNameAST::firstToken() const
|
||||
{
|
||||
if (global_scope_token)
|
||||
return global_scope_token;
|
||||
else if (nested_name_specifier)
|
||||
return nested_name_specifier->firstToken();
|
||||
else if (nested_name_specifier_list)
|
||||
return nested_name_specifier_list->firstToken();
|
||||
return unqualified_name->firstToken();
|
||||
}
|
||||
|
||||
@@ -1317,8 +1317,8 @@ unsigned QualifiedNameAST::lastToken() const
|
||||
if (unqualified_name)
|
||||
return unqualified_name->lastToken();
|
||||
|
||||
if (nested_name_specifier)
|
||||
return nested_name_specifier->lastToken();
|
||||
if (nested_name_specifier_list)
|
||||
return nested_name_specifier_list->lastToken();
|
||||
|
||||
if (global_scope_token)
|
||||
return global_scope_token + 1;
|
||||
@@ -1355,10 +1355,10 @@ unsigned ReturnStatementAST::lastToken() const
|
||||
|
||||
unsigned SimpleDeclarationAST::firstToken() const
|
||||
{
|
||||
if (decl_specifier_seq)
|
||||
return decl_specifier_seq->firstToken();
|
||||
else if (declarators)
|
||||
return declarators->firstToken();
|
||||
if (decl_specifier_list)
|
||||
return decl_specifier_list->firstToken();
|
||||
else if (declarator_list)
|
||||
return declarator_list->firstToken();
|
||||
return semicolon_token;
|
||||
}
|
||||
|
||||
@@ -1367,11 +1367,11 @@ unsigned SimpleDeclarationAST::lastToken() const
|
||||
if (semicolon_token)
|
||||
return semicolon_token + 1;
|
||||
|
||||
else if (declarators)
|
||||
return declarators->lastToken();
|
||||
else if (declarator_list)
|
||||
return declarator_list->lastToken();
|
||||
|
||||
else if (decl_specifier_seq)
|
||||
return decl_specifier_seq->lastToken();
|
||||
else if (decl_specifier_list)
|
||||
return decl_specifier_list->lastToken();
|
||||
|
||||
// ### assert(0);
|
||||
return 0;
|
||||
@@ -1476,8 +1476,8 @@ unsigned TemplateDeclarationAST::lastToken() const
|
||||
else if (greater_token)
|
||||
return greater_token + 1;
|
||||
|
||||
else if (template_parameters)
|
||||
return template_parameters->lastToken();
|
||||
else if (template_parameter_list)
|
||||
return template_parameter_list->lastToken();
|
||||
|
||||
else if (less_token)
|
||||
return less_token + 1;
|
||||
@@ -1503,8 +1503,8 @@ unsigned TemplateIdAST::lastToken() const
|
||||
if (greater_token)
|
||||
return greater_token + 1;
|
||||
|
||||
else if (template_arguments)
|
||||
return template_arguments->lastToken();
|
||||
else if (template_argument_list)
|
||||
return template_argument_list->lastToken();
|
||||
|
||||
else if (less_token)
|
||||
return less_token + 1;
|
||||
@@ -1535,8 +1535,8 @@ unsigned TemplateTypeParameterAST::lastToken() const
|
||||
else if (greater_token)
|
||||
return greater_token + 1;
|
||||
|
||||
else if (template_parameters)
|
||||
return template_parameters->lastToken();
|
||||
else if (template_parameter_list)
|
||||
return template_parameter_list->lastToken();
|
||||
|
||||
else if (less_token)
|
||||
return less_token + 1;
|
||||
@@ -1570,13 +1570,13 @@ unsigned ThrowExpressionAST::lastToken() const
|
||||
|
||||
unsigned TranslationUnitAST::firstToken() const
|
||||
{
|
||||
return declarations->firstToken();
|
||||
return declaration_list->firstToken();
|
||||
}
|
||||
|
||||
unsigned TranslationUnitAST::lastToken() const
|
||||
{
|
||||
if (declarations)
|
||||
return declarations->lastToken();
|
||||
if (declaration_list)
|
||||
return declaration_list->lastToken();
|
||||
|
||||
// ### assert(0);
|
||||
return 0;
|
||||
@@ -1601,7 +1601,7 @@ unsigned TryBlockStatementAST::lastToken() const
|
||||
|
||||
unsigned TypeConstructorCallAST::firstToken() const
|
||||
{
|
||||
return type_specifier->firstToken();
|
||||
return type_specifier_list->firstToken();
|
||||
}
|
||||
|
||||
unsigned TypeConstructorCallAST::lastToken() const
|
||||
@@ -1615,8 +1615,8 @@ unsigned TypeConstructorCallAST::lastToken() const
|
||||
else if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
|
||||
else if (type_specifier)
|
||||
return type_specifier->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
// ### assert(0);
|
||||
return 0;
|
||||
@@ -1625,7 +1625,7 @@ unsigned TypeConstructorCallAST::lastToken() const
|
||||
|
||||
unsigned TypeIdAST::firstToken() const
|
||||
{
|
||||
return type_specifier->firstToken();
|
||||
return type_specifier_list->firstToken();
|
||||
}
|
||||
|
||||
unsigned TypeIdAST::lastToken() const
|
||||
@@ -1633,8 +1633,8 @@ unsigned TypeIdAST::lastToken() const
|
||||
if (declarator)
|
||||
return declarator->lastToken();
|
||||
|
||||
else if (type_specifier)
|
||||
return type_specifier->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
|
||||
// ### assert(0);
|
||||
return 0;
|
||||
@@ -1771,8 +1771,8 @@ unsigned WhileStatementAST::lastToken() const
|
||||
// ObjC++
|
||||
unsigned ObjCClassForwardDeclarationAST::firstToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->firstToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
|
||||
return class_token;
|
||||
}
|
||||
@@ -1790,8 +1790,8 @@ unsigned ObjCClassForwardDeclarationAST::lastToken() const
|
||||
|
||||
unsigned ObjCProtocolForwardDeclarationAST::firstToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->firstToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
|
||||
return protocol_token;
|
||||
}
|
||||
@@ -1809,8 +1809,8 @@ unsigned ObjCProtocolForwardDeclarationAST::lastToken() const
|
||||
|
||||
unsigned ObjCClassDeclarationAST::firstToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->firstToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
|
||||
if (interface_token)
|
||||
return interface_token;
|
||||
@@ -1821,7 +1821,7 @@ unsigned ObjCClassDeclarationAST::firstToken() const
|
||||
unsigned ObjCClassDeclarationAST::lastToken() const
|
||||
{
|
||||
if (end_token) return end_token + 1;
|
||||
if (member_declarations) return member_declarations->lastToken();
|
||||
if (member_declaration_list) return member_declaration_list->lastToken();
|
||||
if (inst_vars_decl) return inst_vars_decl->lastToken();
|
||||
if (protocol_refs)
|
||||
return protocol_refs->lastToken();
|
||||
@@ -1844,8 +1844,8 @@ unsigned ObjCClassDeclarationAST::lastToken() const
|
||||
|
||||
unsigned ObjCProtocolDeclarationAST::firstToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->firstToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
return protocol_token;
|
||||
}
|
||||
|
||||
@@ -1854,8 +1854,8 @@ unsigned ObjCProtocolDeclarationAST::lastToken() const
|
||||
if (end_token)
|
||||
return end_token + 1;
|
||||
|
||||
else if (member_declarations)
|
||||
return member_declarations->lastToken();
|
||||
else if (member_declaration_list)
|
||||
return member_declaration_list->lastToken();
|
||||
|
||||
else if (protocol_refs)
|
||||
return protocol_refs->lastToken();
|
||||
@@ -1863,8 +1863,8 @@ unsigned ObjCProtocolDeclarationAST::lastToken() const
|
||||
else if (name)
|
||||
return name->lastToken();
|
||||
|
||||
else if (attributes)
|
||||
return attributes->lastToken();
|
||||
else if (attribute_list)
|
||||
return attribute_list->lastToken();
|
||||
|
||||
return protocol_token + 1;
|
||||
}
|
||||
@@ -1997,12 +1997,12 @@ unsigned ObjCSelectorArgumentAST::lastToken() const
|
||||
|
||||
unsigned ObjCSelectorWithArgumentsAST::firstToken() const
|
||||
{
|
||||
return selector_arguments->firstToken();
|
||||
return selector_argument_list->firstToken();
|
||||
}
|
||||
|
||||
unsigned ObjCSelectorWithArgumentsAST::lastToken() const
|
||||
{
|
||||
return selector_arguments->lastToken();
|
||||
return selector_argument_list->lastToken();
|
||||
}
|
||||
|
||||
unsigned ObjCSelectorExpressionAST::firstToken() const
|
||||
@@ -2031,8 +2031,8 @@ unsigned ObjCInstanceVariablesDeclarationAST::lastToken() const
|
||||
if (rbrace_token)
|
||||
return rbrace_token + 1;
|
||||
|
||||
if (instance_variables)
|
||||
return instance_variables->lastToken();
|
||||
if (instance_variable_list)
|
||||
return instance_variable_list->lastToken();
|
||||
|
||||
return lbrace_token + 1;
|
||||
}
|
||||
@@ -2064,8 +2064,8 @@ unsigned ObjCPropertyAttributeAST::lastToken() const
|
||||
|
||||
unsigned ObjCPropertyDeclarationAST::firstToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->firstToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->firstToken();
|
||||
|
||||
return property_token;
|
||||
}
|
||||
@@ -2076,8 +2076,8 @@ unsigned ObjCPropertyDeclarationAST::lastToken() const
|
||||
return simple_declaration->lastToken();
|
||||
else if (rparen_token)
|
||||
return rparen_token + 1;
|
||||
else if (property_attributes)
|
||||
return property_attributes->lastToken();
|
||||
else if (property_attribute_list)
|
||||
return property_attribute_list->lastToken();
|
||||
else if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
|
||||
@@ -2110,12 +2110,12 @@ unsigned ObjCMethodPrototypeAST::firstToken() const
|
||||
|
||||
unsigned ObjCMethodPrototypeAST::lastToken() const
|
||||
{
|
||||
if (attributes)
|
||||
return attributes->lastToken();
|
||||
if (attribute_list)
|
||||
return attribute_list->lastToken();
|
||||
else if (dot_dot_dot_token)
|
||||
return dot_dot_dot_token + 1;
|
||||
else if (arguments)
|
||||
return arguments->lastToken();
|
||||
else if (argument_list)
|
||||
return argument_list->lastToken();
|
||||
else if (type_name)
|
||||
return type_name->lastToken();
|
||||
return method_type_token + 1;
|
||||
@@ -2164,8 +2164,8 @@ unsigned ObjCSynthesizedPropertiesDeclarationAST::lastToken() const
|
||||
{
|
||||
if (semicolon_token)
|
||||
return semicolon_token + 1;
|
||||
else if (property_identifiers)
|
||||
return property_identifiers->lastToken();
|
||||
else if (property_identifier_list)
|
||||
return property_identifier_list->lastToken();
|
||||
else
|
||||
return synthesized_token + 1;
|
||||
}
|
||||
@@ -2179,8 +2179,8 @@ unsigned ObjCDynamicPropertiesDeclarationAST::lastToken() const
|
||||
{
|
||||
if (semicolon_token)
|
||||
return semicolon_token + 1;
|
||||
else if (property_identifiers)
|
||||
return property_identifiers->lastToken();
|
||||
else if (property_identifier_list)
|
||||
return property_identifier_list->lastToken();
|
||||
else
|
||||
return dynamic_token + 1;
|
||||
}
|
||||
@@ -2204,8 +2204,8 @@ unsigned ObjCFastEnumerationAST::lastToken() const
|
||||
return initializer->lastToken();
|
||||
else if (declarator)
|
||||
return declarator->lastToken();
|
||||
else if (type_specifiers)
|
||||
return type_specifiers->lastToken();
|
||||
else if (type_specifier_list)
|
||||
return type_specifier_list->lastToken();
|
||||
else if (lparen_token)
|
||||
return lparen_token + 1;
|
||||
else
|
||||
|
||||
+54
-54
@@ -286,7 +286,7 @@ public:
|
||||
unsigned attribute_token;
|
||||
unsigned first_lparen_token;
|
||||
unsigned second_lparen_token;
|
||||
AttributeListAST *attributes;
|
||||
AttributeListAST *attribute_list;
|
||||
unsigned first_rparen_token;
|
||||
unsigned second_rparen_token;
|
||||
|
||||
@@ -370,11 +370,11 @@ public:
|
||||
class CPLUSPLUS_EXPORT DeclaratorAST: public AST
|
||||
{
|
||||
public:
|
||||
SpecifierListAST *attributes;
|
||||
PtrOperatorListAST *ptr_operators;
|
||||
SpecifierListAST *attribute_list;
|
||||
PtrOperatorListAST *ptr_operator_list;
|
||||
CoreDeclaratorAST *core_declarator;
|
||||
PostfixDeclaratorListAST *postfix_declarators;
|
||||
SpecifierListAST *post_attributes;
|
||||
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 *declarators;
|
||||
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 *attributes;
|
||||
SpecifierListAST *attribute_list;
|
||||
NameAST *name;
|
||||
unsigned colon_token;
|
||||
BaseSpecifierListAST *base_clause_list;
|
||||
unsigned lbrace_token;
|
||||
DeclarationListAST *member_specifiers;
|
||||
DeclarationListAST *member_specifier_list;
|
||||
unsigned rbrace_token;
|
||||
|
||||
public: // annotations
|
||||
@@ -600,7 +600,7 @@ class CPLUSPLUS_EXPORT CompoundStatementAST: public StatementAST
|
||||
{
|
||||
public:
|
||||
unsigned lbrace_token;
|
||||
StatementListAST *statements;
|
||||
StatementListAST *statement_list;
|
||||
unsigned rbrace_token;
|
||||
|
||||
public: // annotations
|
||||
@@ -619,7 +619,7 @@ protected:
|
||||
class CPLUSPLUS_EXPORT ConditionAST: public ExpressionAST
|
||||
{
|
||||
public:
|
||||
SpecifierListAST *type_specifiers;
|
||||
SpecifierListAST *type_specifier_list;
|
||||
DeclaratorAST *declarator;
|
||||
|
||||
public:
|
||||
@@ -676,7 +676,7 @@ class CPLUSPLUS_EXPORT CtorInitializerAST: public AST
|
||||
{
|
||||
public:
|
||||
unsigned colon_token;
|
||||
MemInitializerListAST *member_initializers;
|
||||
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 *enumerators;
|
||||
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_ids;
|
||||
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_specifiers;
|
||||
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 *declarations;
|
||||
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_operators;
|
||||
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_arguments;
|
||||
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 *attributes;
|
||||
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_operators;
|
||||
NewArrayDeclaratorListAST *new_array_declarators;
|
||||
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_declarations;
|
||||
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_expressions;
|
||||
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_parameters;
|
||||
DeclarationListAST *template_parameter_list;
|
||||
unsigned greater_token;
|
||||
DeclarationAST *declaration;
|
||||
|
||||
@@ -1867,7 +1867,7 @@ protected:
|
||||
class CPLUSPLUS_EXPORT TranslationUnitAST: public AST
|
||||
{
|
||||
public:
|
||||
DeclarationListAST *declarations;
|
||||
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_parameters;
|
||||
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 *attributes;
|
||||
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 *attributes;
|
||||
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_declarations;
|
||||
DeclarationListAST *member_declaration_list;
|
||||
unsigned end_token;
|
||||
|
||||
public: // annotations
|
||||
@@ -2114,7 +2114,7 @@ protected:
|
||||
class CPLUSPLUS_EXPORT ObjCProtocolForwardDeclarationAST: public DeclarationAST
|
||||
{
|
||||
public:
|
||||
SpecifierListAST *attributes;
|
||||
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 *attributes;
|
||||
SpecifierListAST *attribute_list;
|
||||
unsigned protocol_token;
|
||||
NameAST *name;
|
||||
ObjCProtocolRefsAST *protocol_refs;
|
||||
DeclarationListAST *member_declarations;
|
||||
DeclarationListAST *member_declaration_list;
|
||||
unsigned end_token;
|
||||
|
||||
public: // annotations
|
||||
@@ -2302,7 +2302,7 @@ protected:
|
||||
class CPLUSPLUS_EXPORT ObjCSelectorWithArgumentsAST: public ObjCSelectorAST
|
||||
{
|
||||
public:
|
||||
ObjCSelectorArgumentListAST *selector_arguments;
|
||||
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_variables;
|
||||
DeclarationListAST *instance_variable_list;
|
||||
unsigned rbrace_token;
|
||||
|
||||
public:
|
||||
@@ -2384,10 +2384,10 @@ protected:
|
||||
class CPLUSPLUS_EXPORT ObjCPropertyDeclarationAST: public DeclarationAST
|
||||
{
|
||||
public:
|
||||
SpecifierListAST *attributes;
|
||||
SpecifierListAST *attribute_list;
|
||||
unsigned property_token;
|
||||
unsigned lparen_token;
|
||||
ObjCPropertyAttributeListAST *property_attributes;
|
||||
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 *attributes;
|
||||
SpecifierListAST *attribute_list;
|
||||
unsigned param_name_token;
|
||||
|
||||
public: // annotations
|
||||
@@ -2427,9 +2427,9 @@ public:
|
||||
unsigned method_type_token;
|
||||
ObjCTypeNameAST *type_name;
|
||||
ObjCSelectorAST *selector;
|
||||
ObjCMessageArgumentDeclarationListAST *arguments;
|
||||
ObjCMessageArgumentDeclarationListAST *argument_list;
|
||||
unsigned dot_dot_dot_token;
|
||||
SpecifierListAST *attributes;
|
||||
SpecifierListAST *attribute_list;
|
||||
|
||||
public: // annotations
|
||||
ObjCMethod *symbol;
|
||||
@@ -2482,7 +2482,7 @@ class CPLUSPLUS_EXPORT ObjCSynthesizedPropertiesDeclarationAST: public Declarati
|
||||
{
|
||||
public:
|
||||
unsigned synthesized_token;
|
||||
ObjCSynthesizedPropertyListAST *property_identifiers;
|
||||
ObjCSynthesizedPropertyListAST *property_identifier_list;
|
||||
unsigned semicolon_token;
|
||||
|
||||
public:
|
||||
@@ -2499,7 +2499,7 @@ class CPLUSPLUS_EXPORT ObjCDynamicPropertiesDeclarationAST: public DeclarationAS
|
||||
{
|
||||
public:
|
||||
unsigned dynamic_token;
|
||||
ObjCIdentifierListAST *property_identifiers;
|
||||
ObjCIdentifierListAST *property_identifier_list;
|
||||
unsigned semicolon_token;
|
||||
|
||||
public:
|
||||
@@ -2519,7 +2519,7 @@ public:
|
||||
unsigned lparen_token;
|
||||
|
||||
// declaration
|
||||
SpecifierListAST *type_specifiers;
|
||||
SpecifierListAST *type_specifier_list;
|
||||
DeclaratorAST *declarator;
|
||||
// or an expression
|
||||
ExpressionAST *initializer;
|
||||
|
||||
@@ -42,7 +42,7 @@ void SimpleSpecifierAST::accept0(ASTVisitor *visitor)
|
||||
void AttributeSpecifierAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, 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(attributes, visitor);
|
||||
accept(ptr_operators, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(ptr_operator_list, visitor);
|
||||
accept(core_declarator, visitor);
|
||||
accept(postfix_declarators, visitor);
|
||||
accept(post_attributes, visitor);
|
||||
accept(postfix_declarator_list, visitor);
|
||||
accept(post_attribute_list, visitor);
|
||||
accept(initializer, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -79,8 +79,8 @@ void DeclaratorAST::accept0(ASTVisitor *visitor)
|
||||
void SimpleDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(decl_specifier_seq, visitor);
|
||||
accept(declarators, visitor);
|
||||
accept(decl_specifier_list, visitor);
|
||||
accept(declarator_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -152,10 +152,10 @@ void CastExpressionAST::accept0(ASTVisitor *visitor)
|
||||
void ClassSpecifierAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(name, visitor);
|
||||
accept(base_clause_list, visitor);
|
||||
accept(member_specifiers, visitor);
|
||||
accept(member_specifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ void CaseStatementAST::accept0(ASTVisitor *visitor)
|
||||
void CompoundStatementAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(statements, visitor);
|
||||
accept(statement_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -180,7 +180,7 @@ void CompoundStatementAST::accept0(ASTVisitor *visitor)
|
||||
void ConditionAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifiers, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -208,7 +208,7 @@ void CppCastExpressionAST::accept0(ASTVisitor *visitor)
|
||||
void CtorInitializerAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(member_initializers, visitor);
|
||||
accept(member_initializer_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -241,7 +241,7 @@ void FunctionDeclaratorAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(parameters, visitor);
|
||||
accept(cv_qualifier_seq, visitor);
|
||||
accept(cv_qualifier_list, visitor);
|
||||
accept(exception_specification, visitor);
|
||||
accept(as_cpp_initializer, visitor);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ void EnumSpecifierAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(name, visitor);
|
||||
accept(enumerators, visitor);
|
||||
accept(enumerator_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ void EnumeratorAST::accept0(ASTVisitor *visitor)
|
||||
void ExceptionDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifier, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -318,7 +318,7 @@ void ExceptionDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ExceptionSpecificationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_ids, visitor);
|
||||
accept(type_id_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -343,7 +343,7 @@ void ExpressionStatementAST::accept0(ASTVisitor *visitor)
|
||||
void FunctionDefinitionAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(decl_specifier_seq, visitor);
|
||||
accept(decl_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
accept(ctor_initializer, visitor);
|
||||
accept(function_body, visitor);
|
||||
@@ -354,7 +354,7 @@ void FunctionDefinitionAST::accept0(ASTVisitor *visitor)
|
||||
void ForeachStatementAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifiers, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
accept(initializer, visitor);
|
||||
accept(expression, visitor);
|
||||
@@ -403,7 +403,7 @@ void LabeledStatementAST::accept0(ASTVisitor *visitor)
|
||||
void LinkageBodyAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(declarations, visitor);
|
||||
accept(declaration_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -436,7 +436,7 @@ void NestedNameSpecifierAST::accept0(ASTVisitor *visitor)
|
||||
void QualifiedNameAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(nested_name_specifier, visitor);
|
||||
accept(nested_name_specifier_list, visitor);
|
||||
accept(unqualified_name, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -453,8 +453,8 @@ void OperatorFunctionIdAST::accept0(ASTVisitor *visitor)
|
||||
void ConversionFunctionIdAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifier, visitor);
|
||||
accept(ptr_operators, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(ptr_operator_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -476,7 +476,7 @@ void DestructorNameAST::accept0(ASTVisitor *visitor)
|
||||
void TemplateIdAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(template_arguments, visitor);
|
||||
accept(template_argument_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -484,7 +484,7 @@ void TemplateIdAST::accept0(ASTVisitor *visitor)
|
||||
void NamespaceAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(linkage_body, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -536,9 +536,9 @@ void NewInitializerAST::accept0(ASTVisitor *visitor)
|
||||
void NewTypeIdAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifier, visitor);
|
||||
accept(ptr_operators, visitor);
|
||||
accept(new_array_declarators, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(ptr_operator_list, visitor);
|
||||
accept(new_array_declarator_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -553,7 +553,7 @@ void OperatorAST::accept0(ASTVisitor *visitor)
|
||||
void ParameterDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifier, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
accept(expression, visitor);
|
||||
}
|
||||
@@ -563,7 +563,7 @@ void ParameterDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ParameterDeclarationClauseAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(parameter_declarations, visitor);
|
||||
accept(parameter_declaration_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -619,7 +619,7 @@ void TypenameCallExpressionAST::accept0(ASTVisitor *visitor)
|
||||
void TypeConstructorCallAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifier, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(expression_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -629,7 +629,7 @@ void PostfixExpressionAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(base_expression, visitor);
|
||||
accept(postfix_expressions, visitor);
|
||||
accept(postfix_expression_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -637,8 +637,8 @@ void PostfixExpressionAST::accept0(ASTVisitor *visitor)
|
||||
void PointerToMemberAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(nested_name_specifier, visitor);
|
||||
accept(cv_qualifier_seq, visitor);
|
||||
accept(nested_name_specifier_list, visitor);
|
||||
accept(cv_qualifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -646,7 +646,7 @@ void PointerToMemberAST::accept0(ASTVisitor *visitor)
|
||||
void PointerAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(cv_qualifier_seq, visitor);
|
||||
accept(cv_qualifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -743,7 +743,7 @@ void SwitchStatementAST::accept0(ASTVisitor *visitor)
|
||||
void TemplateDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(template_parameters, visitor);
|
||||
accept(template_parameter_list, visitor);
|
||||
accept(declaration, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -760,7 +760,7 @@ void ThrowExpressionAST::accept0(ASTVisitor *visitor)
|
||||
void TranslationUnitAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(declarations, visitor);
|
||||
accept(declaration_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -786,7 +786,7 @@ void CatchClauseAST::accept0(ASTVisitor *visitor)
|
||||
void TypeIdAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifier, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -804,7 +804,7 @@ void TypenameTypeParameterAST::accept0(ASTVisitor *visitor)
|
||||
void TemplateTypeParameterAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(template_parameters, visitor);
|
||||
accept(template_parameter_list, visitor);
|
||||
accept(name, visitor);
|
||||
accept(type_id, visitor);
|
||||
}
|
||||
@@ -847,7 +847,7 @@ void WhileStatementAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCClassForwardDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(identifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -856,13 +856,13 @@ void ObjCClassForwardDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCClassDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(class_name, visitor);
|
||||
accept(category_name, visitor);
|
||||
accept(superclass, visitor);
|
||||
accept(protocol_refs, visitor);
|
||||
accept(inst_vars_decl, visitor);
|
||||
accept(member_declarations, visitor);
|
||||
accept(member_declaration_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -870,7 +870,7 @@ void ObjCClassDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCProtocolForwardDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(identifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -879,10 +879,10 @@ void ObjCProtocolForwardDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCProtocolDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(name, visitor);
|
||||
accept(protocol_refs, visitor);
|
||||
accept(member_declarations, visitor);
|
||||
accept(member_declaration_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -953,7 +953,7 @@ void ObjCSelectorArgumentAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCSelectorWithArgumentsAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(selector_arguments, visitor);
|
||||
accept(selector_argument_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -969,7 +969,7 @@ void ObjCSelectorExpressionAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCInstanceVariablesDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(instance_variables, visitor);
|
||||
accept(instance_variable_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -992,8 +992,8 @@ void ObjCPropertyAttributeAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCPropertyDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(attributes, visitor);
|
||||
accept(property_attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
accept(property_attribute_list, visitor);
|
||||
accept(simple_declaration, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
@@ -1003,7 +1003,7 @@ void ObjCMessageArgumentDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_name, visitor);
|
||||
accept(attributes, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -1013,8 +1013,8 @@ void ObjCMethodPrototypeAST::accept0(ASTVisitor *visitor)
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_name, visitor);
|
||||
accept(selector, visitor);
|
||||
accept(arguments, visitor);
|
||||
accept(attributes, visitor);
|
||||
accept(argument_list, visitor);
|
||||
accept(attribute_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -1038,7 +1038,7 @@ void ObjCSynthesizedPropertyAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCSynthesizedPropertiesDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(property_identifiers, visitor);
|
||||
accept(property_identifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -1046,7 +1046,7 @@ void ObjCSynthesizedPropertiesDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCDynamicPropertiesDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(property_identifiers, visitor);
|
||||
accept(property_identifier_list, visitor);
|
||||
}
|
||||
visitor->endVisit(this);
|
||||
}
|
||||
@@ -1054,7 +1054,7 @@ void ObjCDynamicPropertiesDeclarationAST::accept0(ASTVisitor *visitor)
|
||||
void ObjCFastEnumerationAST::accept0(ASTVisitor *visitor)
|
||||
{
|
||||
if (visitor->visit(this)) {
|
||||
accept(type_specifiers, visitor);
|
||||
accept(type_specifier_list, visitor);
|
||||
accept(declarator, visitor);
|
||||
accept(initializer, visitor);
|
||||
accept(fast_enumeratable_expression, visitor);
|
||||
|
||||
@@ -136,7 +136,7 @@ unsigned CheckDeclaration::locationOfDeclaratorId(DeclaratorAST *declarator) con
|
||||
|
||||
bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
|
||||
{
|
||||
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_seq, _scope);
|
||||
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_list, _scope);
|
||||
FullySpecifiedType qualTy = ty.qualifiedType();
|
||||
|
||||
if (_templateParameters && ty) {
|
||||
@@ -145,8 +145,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
|
||||
}
|
||||
}
|
||||
|
||||
if (! ast->declarators && ast->decl_specifier_seq && ! ast->decl_specifier_seq->next) {
|
||||
if (ElaboratedTypeSpecifierAST *elab_type_spec = ast->decl_specifier_seq->value->asElaboratedTypeSpecifier()) {
|
||||
if (! ast->declarator_list && ast->decl_specifier_list && ! ast->decl_specifier_list->next) {
|
||||
if (ElaboratedTypeSpecifierAST *elab_type_spec = ast->decl_specifier_list->value->asElaboratedTypeSpecifier()) {
|
||||
|
||||
unsigned sourceLocation = elab_type_spec->firstToken();
|
||||
|
||||
@@ -171,7 +171,7 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
|
||||
const bool isQ_SIGNAL = ast->qt_invokable_token && tokenKind(ast->qt_invokable_token) == T_Q_SIGNAL;
|
||||
|
||||
List<Declaration *> **decl_it = &ast->symbols;
|
||||
for (DeclaratorListAST *it = ast->declarators; it; it = it->next) {
|
||||
for (DeclaratorListAST *it = ast->declarator_list; it; it = it->next) {
|
||||
Name *name = 0;
|
||||
FullySpecifiedType declTy = semantic()->check(it->value, qualTy,
|
||||
_scope, &name);
|
||||
@@ -208,7 +208,7 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
|
||||
symbol->setType(control()->integerType(IntegerType::Int));
|
||||
symbol->setType(declTy);
|
||||
|
||||
if (_templateParameters && it == ast->declarators && ty && ! ty->isClassType())
|
||||
if (_templateParameters && it == ast->declarator_list && ty && ! ty->isClassType())
|
||||
symbol->setTemplateParameters(_templateParameters);
|
||||
|
||||
symbol->setVisibility(semantic()->currentVisibility());
|
||||
@@ -265,7 +265,7 @@ bool CheckDeclaration::visit(AsmDefinitionAST *)
|
||||
|
||||
bool CheckDeclaration::visit(ExceptionDeclarationAST *ast)
|
||||
{
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
|
||||
FullySpecifiedType qualTy = ty.qualifiedType();
|
||||
|
||||
Name *name = 0;
|
||||
@@ -291,7 +291,7 @@ bool CheckDeclaration::visit(ExceptionDeclarationAST *ast)
|
||||
|
||||
bool CheckDeclaration::visit(FunctionDefinitionAST *ast)
|
||||
{
|
||||
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_seq, _scope);
|
||||
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_list, _scope);
|
||||
FullySpecifiedType qualTy = ty.qualifiedType();
|
||||
Name *name = 0;
|
||||
FullySpecifiedType funTy = semantic()->check(ast->declarator, qualTy,
|
||||
@@ -362,7 +362,7 @@ bool CheckDeclaration::visit(MemInitializerAST *ast)
|
||||
|
||||
bool CheckDeclaration::visit(LinkageBodyAST *ast)
|
||||
{
|
||||
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
|
||||
for (DeclarationListAST *decl = ast->declaration_list; decl; decl = decl->next) {
|
||||
semantic()->check(decl->value, _scope);
|
||||
}
|
||||
return false;
|
||||
@@ -410,7 +410,7 @@ bool CheckDeclaration::visit(ParameterDeclarationAST *ast)
|
||||
}
|
||||
|
||||
Name *argName = 0;
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
|
||||
FullySpecifiedType argTy = semantic()->check(ast->declarator, ty.qualifiedType(),
|
||||
_scope, &argName);
|
||||
FullySpecifiedType exprTy = semantic()->check(ast->expression, _scope);
|
||||
@@ -427,7 +427,7 @@ bool CheckDeclaration::visit(TemplateDeclarationAST *ast)
|
||||
{
|
||||
Scope *scope = new Scope(_scope->owner());
|
||||
|
||||
for (DeclarationListAST *param = ast->template_parameters; param; param = param->next) {
|
||||
for (DeclarationListAST *param = ast->template_parameter_list; param; param = param->next) {
|
||||
semantic()->check(param->value, scope);
|
||||
}
|
||||
|
||||
@@ -546,7 +546,7 @@ bool CheckDeclaration::visit(ObjCProtocolDeclarationAST *ast)
|
||||
}
|
||||
|
||||
int previousObjCVisibility = semantic()->switchObjCVisibility(Function::Public);
|
||||
for (DeclarationListAST *it = ast->member_declarations; it; it = it->next) {
|
||||
for (DeclarationListAST *it = ast->member_declaration_list; it; it = it->next) {
|
||||
semantic()->check(it->value, protocol->members());
|
||||
}
|
||||
(void) semantic()->switchObjCVisibility(previousObjCVisibility);
|
||||
@@ -625,14 +625,14 @@ bool CheckDeclaration::visit(ObjCClassDeclarationAST *ast)
|
||||
int previousObjCVisibility = semantic()->switchObjCVisibility(Function::Protected);
|
||||
|
||||
if (ast->inst_vars_decl) {
|
||||
for (DeclarationListAST *it = ast->inst_vars_decl->instance_variables; it; it = it->next) {
|
||||
for (DeclarationListAST *it = ast->inst_vars_decl->instance_variable_list; it; it = it->next) {
|
||||
semantic()->check(it->value, klass->members());
|
||||
}
|
||||
}
|
||||
|
||||
(void) semantic()->switchObjCVisibility(Function::Public);
|
||||
|
||||
for (DeclarationListAST *it = ast->member_declarations; it; it = it->next) {
|
||||
for (DeclarationListAST *it = ast->member_declaration_list; it; it = it->next) {
|
||||
semantic()->check(it->value, klass->members());
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ bool CheckDeclaration::visit(ObjCPropertyDeclarationAST *ast)
|
||||
{
|
||||
int propAttrs = None;
|
||||
|
||||
for (ObjCPropertyAttributeListAST *iter= ast->property_attributes; iter; iter = iter->next) {
|
||||
for (ObjCPropertyAttributeListAST *iter= ast->property_attribute_list; iter; iter = iter->next) {
|
||||
ObjCPropertyAttributeAST *attrAst = iter->value;
|
||||
if (!attrAst)
|
||||
continue;
|
||||
|
||||
@@ -133,8 +133,8 @@ Name **CheckDeclarator::switchName(Name **name)
|
||||
|
||||
bool CheckDeclarator::visit(DeclaratorAST *ast)
|
||||
{
|
||||
accept(ast->ptr_operators);
|
||||
accept(ast->postfix_declarators);
|
||||
accept(ast->ptr_operator_list);
|
||||
accept(ast->postfix_declarator_list);
|
||||
accept(ast->core_declarator);
|
||||
|
||||
if (ast->initializer) {
|
||||
@@ -172,7 +172,7 @@ bool CheckDeclarator::visit(FunctionDeclaratorAST *ast)
|
||||
fun->setVirtual(true);
|
||||
|
||||
if (ast->parameters) {
|
||||
DeclarationListAST *parameter_declarations = ast->parameters->parameter_declarations;
|
||||
DeclarationListAST *parameter_declarations = ast->parameters->parameter_declaration_list;
|
||||
for (DeclarationListAST *decl = parameter_declarations; decl; decl = decl->next) {
|
||||
semantic()->check(decl->value, fun->arguments());
|
||||
}
|
||||
@@ -196,7 +196,7 @@ bool CheckDeclarator::visit(FunctionDeclaratorAST *ast)
|
||||
FullySpecifiedType funTy(fun);
|
||||
_fullySpecifiedType = funTy;
|
||||
|
||||
for (SpecifierListAST *it = ast->cv_qualifier_seq; it; it = it->next) {
|
||||
for (SpecifierListAST *it = ast->cv_qualifier_list; it; it = it->next) {
|
||||
SimpleSpecifierAST *cv = static_cast<SimpleSpecifierAST *>(it->value);
|
||||
const int k = tokenKind(cv->specifier_token);
|
||||
if (k == T_CONST)
|
||||
@@ -219,11 +219,11 @@ bool CheckDeclarator::visit(ArrayDeclaratorAST *ast)
|
||||
|
||||
bool CheckDeclarator::visit(PointerToMemberAST *ast)
|
||||
{
|
||||
Name *memberName = semantic()->check(ast->nested_name_specifier, _scope);
|
||||
Name *memberName = semantic()->check(ast->nested_name_specifier_list, _scope);
|
||||
PointerToMemberType *ptrTy = control()->pointerToMemberType(memberName, _fullySpecifiedType);
|
||||
FullySpecifiedType ty(ptrTy);
|
||||
_fullySpecifiedType = ty;
|
||||
applyCvQualifiers(ast->cv_qualifier_seq);
|
||||
applyCvQualifiers(ast->cv_qualifier_list);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ bool CheckDeclarator::visit(PointerAST *ast)
|
||||
PointerType *ptrTy = control()->pointerType(_fullySpecifiedType);
|
||||
FullySpecifiedType ty(ptrTy);
|
||||
_fullySpecifiedType = ty;
|
||||
applyCvQualifiers(ast->cv_qualifier_seq);
|
||||
applyCvQualifiers(ast->cv_qualifier_list);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
|
||||
|
||||
if (ast->selector && ast->selector->asObjCSelectorWithArguments()) {
|
||||
// TODO: add arguments (EV)
|
||||
for (ObjCMessageArgumentDeclarationListAST *it = ast->arguments; it; it = it->next) {
|
||||
for (ObjCMessageArgumentDeclarationListAST *it = ast->argument_list; it; it = it->next) {
|
||||
ObjCMessageArgumentDeclarationAST *argDecl = it->value;
|
||||
|
||||
semantic()->check(argDecl, method->arguments());
|
||||
|
||||
@@ -119,7 +119,7 @@ bool CheckExpression::visit(CastExpressionAST *ast)
|
||||
|
||||
bool CheckExpression::visit(ConditionAST *ast)
|
||||
{
|
||||
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifiers, _scope);
|
||||
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier_list, _scope);
|
||||
Name *name = 0;
|
||||
FullySpecifiedType declTy = semantic()->check(ast->declarator, typeSpecTy.qualifiedType(),
|
||||
_scope, &name);
|
||||
@@ -205,9 +205,9 @@ bool CheckExpression::visit(NewExpressionAST *ast)
|
||||
FullySpecifiedType typeIdTy = semantic()->check(ast->type_id, _scope);
|
||||
|
||||
if (ast->new_type_id) {
|
||||
FullySpecifiedType ty = semantic()->check(ast->new_type_id->type_specifier, _scope);
|
||||
FullySpecifiedType ty = semantic()->check(ast->new_type_id->type_specifier_list, _scope);
|
||||
|
||||
for (NewArrayDeclaratorListAST *it = ast->new_type_id->new_array_declarators; it; it = it->next) {
|
||||
for (NewArrayDeclaratorListAST *it = ast->new_type_id->new_array_declarator_list; it; it = it->next) {
|
||||
if (NewArrayDeclaratorAST *declarator = it->value) {
|
||||
FullySpecifiedType exprTy = semantic()->check(declarator->expression, _scope);
|
||||
}
|
||||
@@ -241,7 +241,7 @@ bool CheckExpression::visit(TypenameCallExpressionAST *ast)
|
||||
|
||||
bool CheckExpression::visit(TypeConstructorCallAST *ast)
|
||||
{
|
||||
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier, _scope);
|
||||
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier_list, _scope);
|
||||
for (ExpressionListAST *it = ast->expression_list; it; it = it->next) {
|
||||
FullySpecifiedType exprTy = semantic()->check(it->value, _scope);
|
||||
}
|
||||
@@ -251,7 +251,7 @@ bool CheckExpression::visit(TypeConstructorCallAST *ast)
|
||||
bool CheckExpression::visit(PostfixExpressionAST *ast)
|
||||
{
|
||||
FullySpecifiedType exprTy = semantic()->check(ast->base_expression, _scope);
|
||||
for (PostfixListAST *it = ast->postfix_expressions; it; it = it->next) {
|
||||
for (PostfixListAST *it = ast->postfix_expression_list; it; it = it->next) {
|
||||
accept(it->value); // ### not exactly.
|
||||
}
|
||||
return false;
|
||||
@@ -301,7 +301,7 @@ bool CheckExpression::visit(ThrowExpressionAST *ast)
|
||||
|
||||
bool CheckExpression::visit(TypeIdAST *ast)
|
||||
{
|
||||
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier, _scope);
|
||||
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier_list, _scope);
|
||||
FullySpecifiedType declTy = semantic()->check(ast->declarator, typeSpecTy.qualifiedType(),
|
||||
_scope);
|
||||
_fullySpecifiedType = declTy;
|
||||
|
||||
@@ -139,7 +139,7 @@ Scope *CheckName::switchScope(Scope *scope)
|
||||
bool CheckName::visit(QualifiedNameAST *ast)
|
||||
{
|
||||
std::vector<Name *> names;
|
||||
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;
|
||||
names.push_back(semantic()->check(nested_name_specifier->class_or_namespace_name, _scope));
|
||||
}
|
||||
@@ -335,8 +335,8 @@ bool CheckName::visit(OperatorFunctionIdAST *ast)
|
||||
|
||||
bool CheckName::visit(ConversionFunctionIdAST *ast)
|
||||
{
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
|
||||
ty = semantic()->check(ast->ptr_operators, ty, _scope);
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
|
||||
ty = semantic()->check(ast->ptr_operator_list, ty, _scope);
|
||||
_name = control()->conversionNameId(ty);
|
||||
return false;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ bool CheckName::visit(TemplateIdAST *ast)
|
||||
{
|
||||
Identifier *id = identifier(ast->identifier_token);
|
||||
std::vector<FullySpecifiedType> templateArguments;
|
||||
for (TemplateArgumentListAST *it = ast->template_arguments; it;
|
||||
for (TemplateArgumentListAST *it = ast->template_argument_list; it;
|
||||
it = it->next) {
|
||||
ExpressionAST *arg = it->value;
|
||||
FullySpecifiedType exprTy = semantic()->check(arg, _scope);
|
||||
@@ -390,7 +390,7 @@ bool CheckName::visit(ObjCSelectorWithoutArgumentsAST *ast)
|
||||
bool CheckName::visit(ObjCSelectorWithArgumentsAST *ast)
|
||||
{
|
||||
std::vector<Name *> names;
|
||||
for (ObjCSelectorArgumentListAST *it = ast->selector_arguments; it; it = it->next) {
|
||||
for (ObjCSelectorArgumentListAST *it = ast->selector_argument_list; it; it = it->next) {
|
||||
Identifier *id = identifier(it->value->name_token);
|
||||
Name *name = control()->nameId(id);
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ bool CheckSpecifier::visit(ClassSpecifierAST *ast)
|
||||
int previousVisibility = semantic()->switchVisibility(visibility);
|
||||
int previousMethodKey = semantic()->switchMethodKey(Function::NormalMethod);
|
||||
|
||||
for (DeclarationListAST *member = ast->member_specifiers; member; member = member->next) {
|
||||
for (DeclarationListAST *member = ast->member_specifier_list; member; member = member->next) {
|
||||
semantic()->check(member->value, klass->members());
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ bool CheckSpecifier::visit(EnumSpecifierAST *ast)
|
||||
e->setVisibility(semantic()->currentVisibility());
|
||||
_scope->enterSymbol(e);
|
||||
_fullySpecifiedType.setType(e);
|
||||
for (EnumeratorListAST *it = ast->enumerators; it; it = it->next) {
|
||||
for (EnumeratorListAST *it = ast->enumerator_list; it; it = it->next) {
|
||||
EnumeratorAST *enumerator = it->value;
|
||||
Identifier *id = identifier(enumerator->identifier_token);
|
||||
if (! id)
|
||||
|
||||
@@ -104,7 +104,7 @@ bool CheckStatement::visit(CompoundStatementAST *ast)
|
||||
ast->symbol = block;
|
||||
_scope->enterSymbol(block);
|
||||
Scope *previousScope = switchScope(block->members());
|
||||
for (StatementListAST *it = ast->statements; it; it = it->next) {
|
||||
for (StatementListAST *it = ast->statement_list; it; it = it->next) {
|
||||
semantic()->check(it->value, _scope);
|
||||
}
|
||||
(void) switchScope(previousScope);
|
||||
@@ -149,8 +149,8 @@ bool CheckStatement::visit(ForeachStatementAST *ast)
|
||||
ast->symbol = block;
|
||||
_scope->enterSymbol(block);
|
||||
Scope *previousScope = switchScope(block->members());
|
||||
if (ast->type_specifiers && ast->declarator) {
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifiers, _scope);
|
||||
if (ast->type_specifier_list && ast->declarator) {
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
|
||||
Name *name = 0;
|
||||
ty = semantic()->check(ast->declarator, ty, _scope, &name);
|
||||
unsigned location = ast->declarator->firstToken();
|
||||
@@ -178,8 +178,8 @@ bool CheckStatement::visit(ObjCFastEnumerationAST *ast)
|
||||
ast->symbol = block;
|
||||
_scope->enterSymbol(block);
|
||||
Scope *previousScope = switchScope(block->members());
|
||||
if (ast->type_specifiers && ast->declarator) {
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifiers, _scope);
|
||||
if (ast->type_specifier_list && ast->declarator) {
|
||||
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
|
||||
Name *name = 0;
|
||||
ty = semantic()->check(ast->declarator, ty, _scope, &name);
|
||||
unsigned location = ast->declarator->firstToken();
|
||||
|
||||
@@ -334,7 +334,7 @@ bool Parser::parseTemplateId(NameAST *&node)
|
||||
ast->identifier_token = consumeToken();
|
||||
ast->less_token = consumeToken();
|
||||
if (LA() == T_GREATER || parseTemplateArgumentList(
|
||||
ast->template_arguments)) {
|
||||
ast->template_argument_list)) {
|
||||
if (LA() == T_GREATER) {
|
||||
ast->greater_token = consumeToken();
|
||||
node = ast;
|
||||
@@ -414,7 +414,7 @@ bool Parser::parseName(NameAST *&node, bool acceptTemplateId)
|
||||
|
||||
QualifiedNameAST *ast = new (_pool) QualifiedNameAST;
|
||||
ast->global_scope_token = global_scope_token;
|
||||
ast->nested_name_specifier = nested_name_specifier;
|
||||
ast->nested_name_specifier_list = nested_name_specifier;
|
||||
ast->unqualified_name = unqualified_name;
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -427,7 +427,7 @@ bool Parser::parseTranslationUnit(TranslationUnitAST *&node)
|
||||
{
|
||||
DEBUG_THIS_RULE();
|
||||
TranslationUnitAST *ast = new (_pool) TranslationUnitAST;
|
||||
DeclarationListAST **decl = &ast->declarations;
|
||||
DeclarationListAST **decl = &ast->declaration_list;
|
||||
|
||||
while (LA()) {
|
||||
unsigned start_declaration = cursor();
|
||||
@@ -553,7 +553,7 @@ bool Parser::parseLinkageBody(DeclarationAST *&node)
|
||||
if (LA() == T_LBRACE) {
|
||||
LinkageBodyAST *ast = new (_pool) LinkageBodyAST;
|
||||
ast->lbrace_token = consumeToken();
|
||||
DeclarationListAST **declaration_ptr = &ast->declarations;
|
||||
DeclarationListAST **declaration_ptr = &ast->declaration_list;
|
||||
|
||||
while (int tk = LA()) {
|
||||
if (tk == T_RBRACE)
|
||||
@@ -602,7 +602,7 @@ bool Parser::parseNamespace(DeclarationAST *&node)
|
||||
ast->namespace_token = namespace_token;
|
||||
if (LA() == T_IDENTIFIER)
|
||||
ast->identifier_token = consumeToken();
|
||||
SpecifierListAST **attr_ptr = &ast->attributes;
|
||||
SpecifierListAST **attr_ptr = &ast->attribute_list;
|
||||
while (LA() == T___ATTRIBUTE__) {
|
||||
parseAttributeSpecifier(*attr_ptr);
|
||||
attr_ptr = &(*attr_ptr)->next;
|
||||
@@ -667,8 +667,8 @@ bool Parser::parseConversionFunctionId(NameAST *&node)
|
||||
|
||||
ConversionFunctionIdAST *ast = new (_pool) ConversionFunctionIdAST;
|
||||
ast->operator_token = operator_token;
|
||||
ast->type_specifier = type_specifier;
|
||||
ast->ptr_operators = ptr_operators;
|
||||
ast->type_specifier_list = type_specifier;
|
||||
ast->ptr_operator_list = ptr_operators;
|
||||
node = ast;
|
||||
return true;
|
||||
}
|
||||
@@ -850,7 +850,7 @@ bool Parser::parseTemplateDeclaration(DeclarationAST *&node)
|
||||
|
||||
if (LA() == T_LESS) {
|
||||
ast->less_token = consumeToken();
|
||||
if (LA() == T_GREATER || parseTemplateParameterList(ast->template_parameters))
|
||||
if (LA() == T_GREATER || parseTemplateParameterList(ast->template_parameter_list))
|
||||
match(T_GREATER, &ast->greater_token);
|
||||
}
|
||||
|
||||
@@ -969,7 +969,7 @@ bool Parser::parsePtrOperator(PtrOperatorListAST *&node)
|
||||
} else if (LA() == T_STAR) {
|
||||
PointerAST *ast = new (_pool) PointerAST;
|
||||
ast->star_token = consumeToken();
|
||||
parseCvQualifiers(ast->cv_qualifier_seq);
|
||||
parseCvQualifiers(ast->cv_qualifier_list);
|
||||
node = new (_pool) PtrOperatorListAST(ast);
|
||||
return true;
|
||||
} else if (LA() == T_COLON_COLON || LA() == T_IDENTIFIER) {
|
||||
@@ -984,9 +984,9 @@ bool Parser::parsePtrOperator(PtrOperatorListAST *&node)
|
||||
if (has_nested_name_specifier && LA() == T_STAR) {
|
||||
PointerToMemberAST *ast = new (_pool) PointerToMemberAST;
|
||||
ast->global_scope_token = global_scope_token;
|
||||
ast->nested_name_specifier = nested_name_specifiers;
|
||||
ast->nested_name_specifier_list = nested_name_specifiers;
|
||||
ast->star_token = consumeToken();
|
||||
parseCvQualifiers(ast->cv_qualifier_seq);
|
||||
parseCvQualifiers(ast->cv_qualifier_list);
|
||||
node = new (_pool) PtrOperatorListAST(ast);
|
||||
return true;
|
||||
}
|
||||
@@ -1095,8 +1095,8 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node)
|
||||
DeclaratorIdAST *declarator_id = new (_pool) DeclaratorIdAST;
|
||||
declarator_id->name = name;
|
||||
DeclaratorAST *ast = new (_pool) DeclaratorAST;
|
||||
ast->attributes = attributes;
|
||||
ast->ptr_operators = ptr_operators;
|
||||
ast->attribute_list = attributes;
|
||||
ast->ptr_operator_list = ptr_operators;
|
||||
ast->core_declarator = declarator_id;
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -1113,7 +1113,7 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node)
|
||||
nested_declarator->declarator = declarator;
|
||||
nested_declarator->rparen_token = consumeToken();
|
||||
DeclaratorAST *ast = new (_pool) DeclaratorAST;
|
||||
ast->ptr_operators = ptr_operators;
|
||||
ast->ptr_operator_list = ptr_operators;
|
||||
ast->core_declarator = nested_declarator;
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -1129,7 +1129,7 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, bool stopAtCppInitializer)
|
||||
if (! parseCoreDeclarator(node))
|
||||
return false;
|
||||
|
||||
PostfixDeclaratorListAST **postfix_ptr = &node->postfix_declarators;
|
||||
PostfixDeclaratorListAST **postfix_ptr = &node->postfix_declarator_list;
|
||||
|
||||
for (;;) {
|
||||
unsigned startOfPostDeclarator = cursor();
|
||||
@@ -1185,7 +1185,7 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, bool stopAtCppInitializer)
|
||||
}
|
||||
|
||||
ast->rparen_token = consumeToken();
|
||||
parseCvQualifiers(ast->cv_qualifier_seq);
|
||||
parseCvQualifiers(ast->cv_qualifier_list);
|
||||
parseExceptionSpecification(ast->exception_specification);
|
||||
*postfix_ptr = new (_pool) PostfixDeclaratorListAST(ast);
|
||||
postfix_ptr = &(*postfix_ptr)->next;
|
||||
@@ -1209,7 +1209,7 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, bool stopAtCppInitializer)
|
||||
consumeToken(); // skip T_RPAREN
|
||||
}
|
||||
|
||||
SpecifierListAST **spec_ptr = &node->post_attributes;
|
||||
SpecifierListAST **spec_ptr = &node->post_attribute_list;
|
||||
while (LA() == T___ATTRIBUTE__) {
|
||||
parseAttributeSpecifier(*spec_ptr);
|
||||
spec_ptr = &(*spec_ptr)->next;
|
||||
@@ -1237,7 +1237,7 @@ bool Parser::parseAbstractCoreDeclarator(DeclaratorAST *&node)
|
||||
nested_declarator->declarator = declarator;
|
||||
nested_declarator->rparen_token = consumeToken();
|
||||
DeclaratorAST *ast = new (_pool) DeclaratorAST;
|
||||
ast->ptr_operators = ptr_operators;
|
||||
ast->ptr_operator_list = ptr_operators;
|
||||
ast->core_declarator = nested_declarator;
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -1247,7 +1247,7 @@ bool Parser::parseAbstractCoreDeclarator(DeclaratorAST *&node)
|
||||
rewind(after_ptr_operators);
|
||||
if (ptr_operators) {
|
||||
DeclaratorAST *ast = new (_pool) DeclaratorAST;
|
||||
ast->ptr_operators = ptr_operators;
|
||||
ast->ptr_operator_list = ptr_operators;
|
||||
node = ast;
|
||||
}
|
||||
|
||||
@@ -1271,7 +1271,7 @@ bool Parser::parseAbstractDeclarator(DeclaratorAST *&node)
|
||||
if (LA() == T_RPAREN)
|
||||
ast->rparen_token = consumeToken();
|
||||
}
|
||||
parseCvQualifiers(ast->cv_qualifier_seq);
|
||||
parseCvQualifiers(ast->cv_qualifier_list);
|
||||
parseExceptionSpecification(ast->exception_specification);
|
||||
*postfix_ptr = new (_pool) PostfixDeclaratorListAST(ast);
|
||||
postfix_ptr = &(*postfix_ptr)->next;
|
||||
@@ -1292,7 +1292,7 @@ bool Parser::parseAbstractDeclarator(DeclaratorAST *&node)
|
||||
if (! node)
|
||||
node = new (_pool) DeclaratorAST;
|
||||
|
||||
node->postfix_declarators = postfix_declarators;
|
||||
node->postfix_declarator_list = postfix_declarators;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1311,7 +1311,7 @@ bool Parser::parseEnumSpecifier(SpecifierListAST *&node)
|
||||
ast->name = name;
|
||||
ast->lbrace_token = consumeToken();
|
||||
unsigned comma_token = 0;
|
||||
EnumeratorListAST **enumerator_ptr = &ast->enumerators;
|
||||
EnumeratorListAST **enumerator_ptr = &ast->enumerator_list;
|
||||
while (int tk = LA()) {
|
||||
if (tk == T_RBRACE)
|
||||
break;
|
||||
@@ -1397,7 +1397,7 @@ bool Parser::parseTemplateTypeParameter(DeclarationAST *&node)
|
||||
ast->template_token = consumeToken();
|
||||
if (LA() == T_LESS)
|
||||
ast->less_token = consumeToken();
|
||||
parseTemplateParameterList(ast->template_parameters);
|
||||
parseTemplateParameterList(ast->template_parameter_list);
|
||||
if (LA() == T_GREATER)
|
||||
ast->greater_token = consumeToken();
|
||||
if (LA() == T_CLASS)
|
||||
@@ -1433,7 +1433,7 @@ bool Parser::parseTypeId(ExpressionAST *&node)
|
||||
SpecifierListAST *type_specifier = 0;
|
||||
if (parseTypeSpecifier(type_specifier)) {
|
||||
TypeIdAST *ast = new (_pool) TypeIdAST;
|
||||
ast->type_specifier = type_specifier;
|
||||
ast->type_specifier_list = type_specifier;
|
||||
parseAbstractDeclarator(ast->declarator);
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -1465,7 +1465,7 @@ bool Parser::parseParameterDeclarationClause(ParameterDeclarationClauseAST *&nod
|
||||
|
||||
if (parameter_declarations || dot_dot_dot_token) {
|
||||
ParameterDeclarationClauseAST *ast = new (_pool) ParameterDeclarationClauseAST;
|
||||
ast->parameter_declarations = parameter_declarations;
|
||||
ast->parameter_declaration_list = parameter_declarations;
|
||||
ast->dot_dot_dot_token = dot_dot_dot_token;
|
||||
node = ast;
|
||||
}
|
||||
@@ -1509,7 +1509,7 @@ bool Parser::parseParameterDeclaration(DeclarationAST *&node)
|
||||
SpecifierListAST *decl_specifier_seq = 0;
|
||||
if (parseDeclSpecifierSeq(decl_specifier_seq)) {
|
||||
ParameterDeclarationAST *ast = new (_pool) ParameterDeclarationAST;
|
||||
ast->type_specifier = decl_specifier_seq;
|
||||
ast->type_specifier_list = decl_specifier_seq;
|
||||
parseDeclaratorOrAbstractDeclarator(ast->declarator);
|
||||
if (LA() == T_EQUAL) {
|
||||
ast->equal_token = consumeToken();
|
||||
@@ -1577,7 +1577,7 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
|
||||
|
||||
ClassSpecifierAST *ast = new (_pool) ClassSpecifierAST;
|
||||
ast->classkey_token = classkey_token;
|
||||
ast->attributes = attributes;
|
||||
ast->attribute_list = attributes;
|
||||
ast->name = name;
|
||||
ast->colon_token = colon_token;
|
||||
ast->base_clause_list = base_clause_list;
|
||||
@@ -1585,7 +1585,7 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
|
||||
if (LA() == T_LBRACE)
|
||||
ast->lbrace_token = consumeToken();
|
||||
|
||||
DeclarationListAST **declaration_ptr = &ast->member_specifiers;
|
||||
DeclarationListAST **declaration_ptr = &ast->member_specifier_list;
|
||||
while (int tk = LA()) {
|
||||
if (tk == T_RBRACE) {
|
||||
ast->rbrace_token = consumeToken();
|
||||
@@ -1679,7 +1679,7 @@ bool Parser::parseCtorInitializer(CtorInitializerAST *&node)
|
||||
CtorInitializerAST *ast = new (_pool) CtorInitializerAST;
|
||||
ast->colon_token = colon_token;
|
||||
|
||||
parseMemInitializerList(ast->member_initializers);
|
||||
parseMemInitializerList(ast->member_initializer_list);
|
||||
node = ast;
|
||||
return true;
|
||||
}
|
||||
@@ -1714,7 +1714,7 @@ bool Parser::parseExceptionSpecification(ExceptionSpecificationAST *&node)
|
||||
if (LA() == T_DOT_DOT_DOT)
|
||||
ast->dot_dot_dot_token = consumeToken();
|
||||
else
|
||||
parseTypeIdList(ast->type_ids);
|
||||
parseTypeIdList(ast->type_id_list);
|
||||
if (LA() == T_RPAREN)
|
||||
ast->rparen_token = consumeToken();
|
||||
node = ast;
|
||||
@@ -1763,7 +1763,7 @@ bool Parser::parseInitDeclarator(DeclaratorAST *&node,
|
||||
}
|
||||
|
||||
if (acceptStructDeclarator && node &&
|
||||
! node->postfix_declarators &&
|
||||
! node->postfix_declarator_list &&
|
||||
node->core_declarator &&
|
||||
node->core_declarator->asNestedDeclarator()) {
|
||||
rewind(start);
|
||||
@@ -1771,7 +1771,7 @@ bool Parser::parseInitDeclarator(DeclaratorAST *&node,
|
||||
}
|
||||
|
||||
if (acceptStructDeclarator && LA() == T_COLON
|
||||
&& (! node || ! node->postfix_declarators)) {
|
||||
&& (! node || ! node->postfix_declarator_list)) {
|
||||
unsigned colon_token = consumeToken();
|
||||
ExpressionAST *expression = 0;
|
||||
if (parseConstantExpression(expression) && (LA() == T_COMMA ||
|
||||
@@ -2169,11 +2169,11 @@ bool Parser::isPointerDeclaration(DeclarationStatementAST *ast) const
|
||||
return false;
|
||||
|
||||
if (SimpleDeclarationAST *declaration = ast->declaration->asSimpleDeclaration()) {
|
||||
if (SpecifierListAST *spec = declaration->decl_specifier_seq) {
|
||||
if (SpecifierListAST *spec = declaration->decl_specifier_list) {
|
||||
if (spec->value->asNamedTypeSpecifier() && ! spec->next) {
|
||||
if (DeclaratorListAST *declarators = declaration->declarators) {
|
||||
if (DeclaratorListAST *declarators = declaration->declarator_list) {
|
||||
if (DeclaratorAST *declarator = declarators->value) {
|
||||
if (declarator->ptr_operators && declarator->equals_token && declarator->initializer) {
|
||||
if (declarator->ptr_operator_list && declarator->equals_token && declarator->initializer) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2191,9 +2191,9 @@ bool Parser::maybeAmbiguousStatement(DeclarationStatementAST *ast) const
|
||||
return false;
|
||||
|
||||
if (SimpleDeclarationAST *declaration = ast->declaration->asSimpleDeclaration()) {
|
||||
if (SpecifierListAST *spec = declaration->decl_specifier_seq) {
|
||||
if (SpecifierListAST *spec = declaration->decl_specifier_list) {
|
||||
if (spec->value->asNamedTypeSpecifier() && ! spec->next) {
|
||||
if (DeclaratorListAST *declarators = declaration->declarators) {
|
||||
if (DeclaratorListAST *declarators = declaration->declarator_list) {
|
||||
if (DeclaratorAST *declarator = declarators->value) {
|
||||
if (declarator->core_declarator &&
|
||||
declarator->core_declarator->asNestedDeclarator()) {
|
||||
@@ -2204,10 +2204,10 @@ bool Parser::maybeAmbiguousStatement(DeclarationStatementAST *ast) const
|
||||
}
|
||||
}
|
||||
|
||||
} else if (DeclaratorListAST *declarators = declaration->declarators) {
|
||||
} else if (DeclaratorListAST *declarators = declaration->declarator_list) {
|
||||
// no decl_specifiers...
|
||||
if (DeclaratorAST *declarator = declarators->value) {
|
||||
if (declarator->postfix_declarators && declarator->postfix_declarators->value->asFunctionDeclarator()
|
||||
if (declarator->postfix_declarator_list && declarator->postfix_declarator_list->value->asFunctionDeclarator()
|
||||
&& ! declarator->initializer) {
|
||||
return false;
|
||||
}
|
||||
@@ -2274,7 +2274,7 @@ bool Parser::parseCondition(ExpressionAST *&node)
|
||||
if (parseInitDeclarator(declarator, /*acceptStructDeclarator=*/false)) {
|
||||
if (declarator->initializer) {
|
||||
ConditionAST *ast = new (_pool) ConditionAST;
|
||||
ast->type_specifiers = type_specifier;
|
||||
ast->type_specifier_list = type_specifier;
|
||||
ast->declarator = declarator;
|
||||
node = ast;
|
||||
blockErrors(blocked);
|
||||
@@ -2333,11 +2333,11 @@ bool Parser::parseForeachStatement(StatementAST *&node)
|
||||
unsigned startOfTypeSpecifier = cursor();
|
||||
bool blocked = blockErrors(true);
|
||||
|
||||
if (parseTypeSpecifier(ast->type_specifiers))
|
||||
if (parseTypeSpecifier(ast->type_specifier_list))
|
||||
parseDeclarator(ast->declarator);
|
||||
|
||||
if (! ast->type_specifiers || ! ast->declarator) {
|
||||
ast->type_specifiers = 0;
|
||||
if (! ast->type_specifier_list || ! ast->declarator) {
|
||||
ast->type_specifier_list = 0;
|
||||
ast->declarator = 0;
|
||||
|
||||
blockErrors(blocked);
|
||||
@@ -2376,20 +2376,20 @@ bool Parser::parseForStatement(StatementAST *&node)
|
||||
ast->for_token = for_token;
|
||||
ast->lparen_token = lparen_token;
|
||||
|
||||
if (parseTypeSpecifier(ast->type_specifiers))
|
||||
if (parseTypeSpecifier(ast->type_specifier_list))
|
||||
parseDeclarator(ast->declarator);
|
||||
|
||||
if ((ast->type_specifiers || ast->declarator) && !peekAtObjCContextKeyword(Token_in)) {
|
||||
if ((ast->type_specifier_list || ast->declarator) && !peekAtObjCContextKeyword(Token_in)) {
|
||||
// woops, probably parsed too much: "in" got parsed as a declarator. Let's redo it:
|
||||
ast->type_specifiers = 0;
|
||||
ast->type_specifier_list = 0;
|
||||
ast->declarator = 0;
|
||||
|
||||
rewind(startOfTypeSpecifier);
|
||||
parseDeclarator(ast->declarator);
|
||||
}
|
||||
|
||||
if (! ast->type_specifiers || ! ast->declarator) {
|
||||
ast->type_specifiers = 0;
|
||||
if (! ast->type_specifier_list || ! ast->declarator) {
|
||||
ast->type_specifier_list = 0;
|
||||
ast->declarator = 0;
|
||||
|
||||
rewind(startOfTypeSpecifier);
|
||||
@@ -2441,7 +2441,7 @@ bool Parser::parseCompoundStatement(StatementAST *&node)
|
||||
if (LA() == T_LBRACE) {
|
||||
CompoundStatementAST *ast = new (_pool) CompoundStatementAST;
|
||||
ast->lbrace_token = consumeToken();
|
||||
StatementListAST **statement_ptr = &ast->statements;
|
||||
StatementListAST **statement_ptr = &ast->statement_list;
|
||||
while (int tk = LA()) {
|
||||
if (tk == T_RBRACE)
|
||||
break;
|
||||
@@ -2586,7 +2586,7 @@ bool Parser::parseDeclarationStatement(StatementAST *&node)
|
||||
return false;
|
||||
|
||||
if (SimpleDeclarationAST *simpleDeclaration = declaration->asSimpleDeclaration()) {
|
||||
if (! simpleDeclaration->decl_specifier_seq) {
|
||||
if (! simpleDeclaration->decl_specifier_list) {
|
||||
rewind(start);
|
||||
return false;
|
||||
}
|
||||
@@ -2683,7 +2683,7 @@ bool Parser::parseAttributeSpecifier(SpecifierListAST *&node)
|
||||
ast->attribute_token = consumeToken();
|
||||
match(T_LPAREN, &ast->first_lparen_token);
|
||||
match(T_LPAREN, &ast->second_lparen_token);
|
||||
parseAttributeList(ast->attributes);
|
||||
parseAttributeList(ast->attribute_list);
|
||||
match(T_RPAREN, &ast->first_rparen_token);
|
||||
match(T_RPAREN, &ast->second_rparen_token);
|
||||
node = new (_pool) SpecifierListAST(ast);
|
||||
@@ -2872,8 +2872,8 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node,
|
||||
}
|
||||
SimpleDeclarationAST *ast = new (_pool) SimpleDeclarationAST;
|
||||
ast->qt_invokable_token = qt_invokable_token;
|
||||
ast->decl_specifier_seq = decl_specifier_seq;
|
||||
ast->declarators = declarator_list;
|
||||
ast->decl_specifier_list = decl_specifier_seq;
|
||||
ast->declarator_list = declarator_list;
|
||||
match(T_SEMICOLON, &ast->semicolon_token);
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -2885,7 +2885,7 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node,
|
||||
if (LA() == T_LBRACE) {
|
||||
FunctionDefinitionAST *ast = new (_pool) FunctionDefinitionAST;
|
||||
ast->qt_invokable_token = qt_invokable_token;
|
||||
ast->decl_specifier_seq = decl_specifier_seq;
|
||||
ast->decl_specifier_list = decl_specifier_seq;
|
||||
ast->declarator = firstDeclarator;
|
||||
ast->ctor_initializer = ctor_initializer;
|
||||
parseFunctionBody(ast->function_body);
|
||||
@@ -2894,7 +2894,7 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node,
|
||||
} else if (LA() == T_TRY) {
|
||||
FunctionDefinitionAST *ast = new (_pool) FunctionDefinitionAST;
|
||||
ast->qt_invokable_token = qt_invokable_token;
|
||||
ast->decl_specifier_seq = decl_specifier_seq;
|
||||
ast->decl_specifier_list = decl_specifier_seq;
|
||||
ast->declarator = firstDeclarator;
|
||||
ast->ctor_initializer = ctor_initializer;
|
||||
parseTryBlockStatement(ast->function_body);
|
||||
@@ -2988,7 +2988,7 @@ bool Parser::parseExceptionDeclaration(ExceptionDeclarationAST *&node)
|
||||
SpecifierListAST *type_specifier = 0;
|
||||
if (parseTypeSpecifier(type_specifier)) {
|
||||
ExceptionDeclarationAST *ast = new (_pool) ExceptionDeclarationAST;
|
||||
ast->type_specifier = type_specifier;
|
||||
ast->type_specifier_list = type_specifier;
|
||||
parseDeclaratorOrAbstractDeclarator(ast->declarator);
|
||||
node = ast;
|
||||
return true;
|
||||
@@ -3185,7 +3185,7 @@ bool Parser::parseObjCSelectorExpression(ExpressionAST *&node)
|
||||
ObjCSelectorWithArgumentsAST *args = new (_pool) ObjCSelectorWithArgumentsAST;
|
||||
ast->selector = args;
|
||||
ObjCSelectorArgumentListAST *last = new (_pool) ObjCSelectorArgumentListAST;
|
||||
args->selector_arguments = last;
|
||||
args->selector_argument_list = last;
|
||||
last->value = new (_pool) ObjCSelectorArgumentAST;
|
||||
last->value->name_token = identifier_token;
|
||||
last->value->colon_token = consumeToken();
|
||||
@@ -3290,7 +3290,7 @@ bool Parser::parseObjCMessageArguments(ObjCSelectorAST *&selNode, ObjCMessageArg
|
||||
}
|
||||
|
||||
ObjCSelectorWithArgumentsAST *selWithArgs = new (_pool) ObjCSelectorWithArgumentsAST;
|
||||
selWithArgs->selector_arguments = selAst;
|
||||
selWithArgs->selector_argument_list = selAst;
|
||||
|
||||
selNode = selWithArgs;
|
||||
argNode = argAst;
|
||||
@@ -3370,7 +3370,7 @@ bool Parser::parseNameId(NameAST *&name)
|
||||
|
||||
else if (LA() == T_LPAREN) {
|
||||
// a template-id followed by a T_LPAREN
|
||||
if (TemplateArgumentListAST *template_arguments = template_id->template_arguments) {
|
||||
if (TemplateArgumentListAST *template_arguments = template_id->template_argument_list) {
|
||||
if (! template_arguments->next && template_arguments->value &&
|
||||
template_arguments->value->asBinaryExpression()) {
|
||||
|
||||
@@ -3550,7 +3550,7 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node)
|
||||
if (LA() == T_RPAREN) {
|
||||
unsigned rparen_token = consumeToken();
|
||||
TypeConstructorCallAST *ast = new (_pool) TypeConstructorCallAST;
|
||||
ast->type_specifier = type_specifier;
|
||||
ast->type_specifier_list = type_specifier;
|
||||
ast->lparen_token = lparen_token;
|
||||
ast->expression_list = expression_list;
|
||||
ast->rparen_token = rparen_token;
|
||||
@@ -3630,7 +3630,7 @@ bool Parser::parsePostfixExpression(ExpressionAST *&node)
|
||||
if (postfix_expressions) {
|
||||
PostfixExpressionAST *ast = new (_pool) PostfixExpressionAST;
|
||||
ast->base_expression = node;
|
||||
ast->postfix_expressions = postfix_expressions;
|
||||
ast->postfix_expression_list = postfix_expressions;
|
||||
node = ast;
|
||||
}
|
||||
return true;
|
||||
@@ -3799,13 +3799,13 @@ bool Parser::parseNewTypeId(NewTypeIdAST *&node)
|
||||
return false;
|
||||
|
||||
NewTypeIdAST *ast = new (_pool) NewTypeIdAST;
|
||||
ast->type_specifier = typeSpec;
|
||||
ast->type_specifier_list = typeSpec;
|
||||
|
||||
PtrOperatorListAST **ptrop_it = &ast->ptr_operators;
|
||||
PtrOperatorListAST **ptrop_it = &ast->ptr_operator_list;
|
||||
while (parsePtrOperator(*ptrop_it))
|
||||
ptrop_it = &(*ptrop_it)->next;
|
||||
|
||||
NewArrayDeclaratorListAST **it = &ast->new_array_declarators;
|
||||
NewArrayDeclaratorListAST **it = &ast->new_array_declarator_list;
|
||||
while (parseNewArrayDeclarator(*it))
|
||||
it = &(*it)->next;
|
||||
|
||||
@@ -4370,7 +4370,7 @@ bool Parser::parseObjCInterface(DeclarationAST *&node,
|
||||
"invalid attributes for category interface declaration");
|
||||
|
||||
ObjCClassDeclarationAST *ast = new (_pool) ObjCClassDeclarationAST;
|
||||
ast->attributes = attributes;
|
||||
ast->attribute_list = attributes;
|
||||
ast->interface_token = objc_interface_token;
|
||||
SimpleNameAST *class_name = new (_pool) SimpleNameAST;
|
||||
class_name->identifier_token= identifier_token;
|
||||
@@ -4387,7 +4387,7 @@ bool Parser::parseObjCInterface(DeclarationAST *&node,
|
||||
|
||||
parseObjCProtocolRefs(ast->protocol_refs);
|
||||
|
||||
DeclarationListAST **nextMembers = &(ast->member_declarations);
|
||||
DeclarationListAST **nextMembers = &(ast->member_declaration_list);
|
||||
DeclarationAST *declaration = 0;
|
||||
while (parseObjCInterfaceMemberDeclaration(declaration)) {
|
||||
*nextMembers = new (_pool) DeclarationListAST;
|
||||
@@ -4402,7 +4402,7 @@ bool Parser::parseObjCInterface(DeclarationAST *&node,
|
||||
} else {
|
||||
// a class interface declaration
|
||||
ObjCClassDeclarationAST *ast = new (_pool) ObjCClassDeclarationAST;
|
||||
ast->attributes = attributes;
|
||||
ast->attribute_list = attributes;
|
||||
ast->interface_token = objc_interface_token;
|
||||
SimpleNameAST* class_name = new (_pool) SimpleNameAST;
|
||||
class_name->identifier_token = identifier_token;
|
||||
@@ -4418,7 +4418,7 @@ bool Parser::parseObjCInterface(DeclarationAST *&node,
|
||||
parseObjCProtocolRefs(ast->protocol_refs);
|
||||
parseObjClassInstanceVariables(ast->inst_vars_decl);
|
||||
|
||||
DeclarationListAST **nextMembers = &(ast->member_declarations);
|
||||
DeclarationListAST **nextMembers = &(ast->member_declaration_list);
|
||||
DeclarationAST *declaration = 0;
|
||||
while (parseObjCInterfaceMemberDeclaration(declaration)) {
|
||||
*nextMembers = new (_pool) DeclarationListAST;
|
||||
@@ -4456,7 +4456,7 @@ bool Parser::parseObjCProtocol(DeclarationAST *&node,
|
||||
// a protocol forward declaration
|
||||
|
||||
ObjCProtocolForwardDeclarationAST *ast = new (_pool) ObjCProtocolForwardDeclarationAST;
|
||||
ast->attributes = attributes;
|
||||
ast->attribute_list = attributes;
|
||||
ast->protocol_token = protocol_token;
|
||||
ast->identifier_list = new (_pool) ObjCIdentifierListAST;
|
||||
SimpleNameAST *name = new (_pool) SimpleNameAST;
|
||||
@@ -4481,7 +4481,7 @@ bool Parser::parseObjCProtocol(DeclarationAST *&node,
|
||||
} else {
|
||||
// a protocol definition
|
||||
ObjCProtocolDeclarationAST *ast = new (_pool) ObjCProtocolDeclarationAST;
|
||||
ast->attributes = attributes;
|
||||
ast->attribute_list = attributes;
|
||||
ast->protocol_token = protocol_token;
|
||||
SimpleNameAST *name = new (_pool) SimpleNameAST;
|
||||
name->identifier_token = identifier_token;
|
||||
@@ -4489,7 +4489,7 @@ bool Parser::parseObjCProtocol(DeclarationAST *&node,
|
||||
|
||||
parseObjCProtocolRefs(ast->protocol_refs);
|
||||
|
||||
DeclarationListAST **nextMembers = &(ast->member_declarations);
|
||||
DeclarationListAST **nextMembers = &(ast->member_declaration_list);
|
||||
DeclarationAST *declaration = 0;
|
||||
while (parseObjCInterfaceMemberDeclaration(declaration)) {
|
||||
*nextMembers = new (_pool) DeclarationListAST;
|
||||
@@ -4532,7 +4532,7 @@ bool Parser::parseObjCImplementation(DeclarationAST *&node)
|
||||
ast->category_name = category_name;
|
||||
match(T_RPAREN, &(ast->rparen_token));
|
||||
|
||||
parseObjCMethodDefinitionList(ast->member_declarations);
|
||||
parseObjCMethodDefinitionList(ast->member_declaration_list);
|
||||
match(T_AT_END, &(ast->end_token));
|
||||
|
||||
node = ast;
|
||||
@@ -4552,7 +4552,7 @@ bool Parser::parseObjCImplementation(DeclarationAST *&node)
|
||||
}
|
||||
|
||||
parseObjClassInstanceVariables(ast->inst_vars_decl);
|
||||
parseObjCMethodDefinitionList(ast->member_declarations);
|
||||
parseObjCMethodDefinitionList(ast->member_declaration_list);
|
||||
match(T_AT_END, &(ast->end_token));
|
||||
|
||||
node = ast;
|
||||
@@ -4587,7 +4587,7 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node)
|
||||
ObjCSynthesizedPropertiesDeclarationAST *ast = new (_pool) ObjCSynthesizedPropertiesDeclarationAST;
|
||||
ast->synthesized_token = consumeToken();
|
||||
ObjCSynthesizedPropertyListAST *last = new (_pool) ObjCSynthesizedPropertyListAST;
|
||||
ast->property_identifiers = last;
|
||||
ast->property_identifier_list = last;
|
||||
last->value = new (_pool) ObjCSynthesizedPropertyAST;
|
||||
match(T_IDENTIFIER, &(last->value->property_identifier));
|
||||
|
||||
@@ -4622,12 +4622,12 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node)
|
||||
case T_AT_DYNAMIC: {
|
||||
ObjCDynamicPropertiesDeclarationAST *ast = new (_pool) ObjCDynamicPropertiesDeclarationAST;
|
||||
ast->dynamic_token = consumeToken();
|
||||
ast->property_identifiers = new (_pool) ObjCIdentifierListAST;
|
||||
ast->property_identifier_list = new (_pool) ObjCIdentifierListAST;
|
||||
SimpleNameAST *name = new (_pool) SimpleNameAST;
|
||||
match(T_IDENTIFIER, &(name->identifier_token));
|
||||
ast->property_identifiers->value = name;
|
||||
ast->property_identifier_list->value = name;
|
||||
|
||||
ObjCIdentifierListAST *last = ast->property_identifiers;
|
||||
ObjCIdentifierListAST *last = ast->property_identifier_list;
|
||||
while (LA() == T_COMMA) {
|
||||
consumeToken(); // consume T_COMMA
|
||||
|
||||
@@ -4742,7 +4742,7 @@ bool Parser::parseObjClassInstanceVariables(ObjCInstanceVariablesDeclarationAST
|
||||
ObjCInstanceVariablesDeclarationAST *ast = new (_pool) ObjCInstanceVariablesDeclarationAST;
|
||||
match(T_LBRACE, &(ast->lbrace_token));
|
||||
|
||||
for (DeclarationListAST **next = &(ast->instance_variables); LA(); next = &((*next)->next)) {
|
||||
for (DeclarationListAST **next = &(ast->instance_variable_list); LA(); next = &((*next)->next)) {
|
||||
if (LA() == T_RBRACE)
|
||||
break;
|
||||
|
||||
@@ -4847,7 +4847,7 @@ bool Parser::parseObjCPropertyDeclaration(DeclarationAST *&node, SpecifierListAS
|
||||
return false;
|
||||
|
||||
ObjCPropertyDeclarationAST *ast = new (_pool) ObjCPropertyDeclarationAST;
|
||||
ast->attributes = attributes;
|
||||
ast->attribute_list = attributes;
|
||||
ast->property_token = consumeToken();
|
||||
|
||||
if (LA() == T_LPAREN) {
|
||||
@@ -4855,9 +4855,9 @@ bool Parser::parseObjCPropertyDeclaration(DeclarationAST *&node, SpecifierListAS
|
||||
|
||||
ObjCPropertyAttributeAST *property_attribute = 0;
|
||||
if (parseObjCPropertyAttribute(property_attribute)) {
|
||||
ast->property_attributes = new (_pool) ObjCPropertyAttributeListAST;
|
||||
ast->property_attributes->value = property_attribute;
|
||||
ObjCPropertyAttributeListAST *last = ast->property_attributes;
|
||||
ast->property_attribute_list = new (_pool) ObjCPropertyAttributeListAST;
|
||||
ast->property_attribute_list->value = property_attribute;
|
||||
ObjCPropertyAttributeListAST *last = ast->property_attribute_list;
|
||||
|
||||
while (LA() == T_COMMA) {
|
||||
consumeToken(); // consume T_COMMA
|
||||
@@ -4906,12 +4906,12 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
|
||||
ObjCSelectorWithArgumentsAST *sel = new (_pool) ObjCSelectorWithArgumentsAST;
|
||||
ast->selector = sel;
|
||||
ObjCSelectorArgumentListAST *lastSel = new (_pool) ObjCSelectorArgumentListAST;
|
||||
sel->selector_arguments = lastSel;
|
||||
sel->selector_arguments->value = argument;
|
||||
sel->selector_argument_list = lastSel;
|
||||
sel->selector_argument_list->value = argument;
|
||||
|
||||
ast->arguments = new (_pool) ObjCMessageArgumentDeclarationListAST;
|
||||
ast->arguments->value = declaration;
|
||||
ObjCMessageArgumentDeclarationListAST *lastArg = ast->arguments;
|
||||
ast->argument_list = new (_pool) ObjCMessageArgumentDeclarationListAST;
|
||||
ast->argument_list->value = declaration;
|
||||
ObjCMessageArgumentDeclarationListAST *lastArg = ast->argument_list;
|
||||
|
||||
while (parseObjCKeywordDeclaration(argument, declaration)) {
|
||||
lastSel->next = new (_pool) ObjCSelectorArgumentListAST;
|
||||
@@ -4943,7 +4943,7 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
|
||||
_translationUnit->error(cursor(), "expected a selector");
|
||||
}
|
||||
|
||||
SpecifierListAST **attr = &ast->attributes;
|
||||
SpecifierListAST **attr = &ast->attribute_list;
|
||||
while (parseAttributeSpecifier(*attr))
|
||||
attr = &(*attr)->next;
|
||||
|
||||
@@ -4992,10 +4992,10 @@ bool Parser::parseObjCPropertyAttribute(ObjCPropertyAttributeAST *&node)
|
||||
node->attribute_identifier_token = consumeToken();
|
||||
match(T_EQUAL, &(node->equals_token));
|
||||
ObjCSelectorWithArgumentsAST *selector = new (_pool) ObjCSelectorWithArgumentsAST;
|
||||
selector->selector_arguments = new (_pool) ObjCSelectorArgumentListAST;
|
||||
selector->selector_arguments->value = new (_pool) ObjCSelectorArgumentAST;
|
||||
match(T_IDENTIFIER, &(selector->selector_arguments->value->name_token));
|
||||
match(T_COLON, &(selector->selector_arguments->value->colon_token));
|
||||
selector->selector_argument_list = new (_pool) ObjCSelectorArgumentListAST;
|
||||
selector->selector_argument_list->value = new (_pool) ObjCSelectorArgumentAST;
|
||||
match(T_IDENTIFIER, &(selector->selector_argument_list->value->name_token));
|
||||
match(T_COLON, &(selector->selector_argument_list->value->colon_token));
|
||||
node->method_selector = selector;
|
||||
return true;
|
||||
}
|
||||
@@ -5050,7 +5050,7 @@ bool Parser::parseObjCKeywordDeclaration(ObjCSelectorArgumentAST *&argument, Obj
|
||||
|
||||
parseObjCTypeName(node->type_name);
|
||||
|
||||
SpecifierListAST **attr = &node->attributes;
|
||||
SpecifierListAST **attr = &node->attribute_list;
|
||||
while (parseAttributeSpecifier(*attr))
|
||||
attr = &(*attr)->next;
|
||||
|
||||
|
||||
@@ -120,11 +120,11 @@ void tst_AST::template_id_1()
|
||||
QVERIFY(ast->asTemplateId() != 0);
|
||||
QCOMPARE(ast->asTemplateId()->identifier_token, 1U);
|
||||
QCOMPARE(ast->asTemplateId()->less_token, 2U);
|
||||
QVERIFY(ast->asTemplateId()->template_arguments != 0);
|
||||
QVERIFY(ast->asTemplateId()->template_arguments->value != 0);
|
||||
QVERIFY(ast->asTemplateId()->template_arguments->value->asNumericLiteral() != 0);
|
||||
QCOMPARE(ast->asTemplateId()->template_arguments->value->asNumericLiteral()->literal_token, 3U);
|
||||
QVERIFY(ast->asTemplateId()->template_arguments->next == 0);
|
||||
QVERIFY(ast->asTemplateId()->template_argument_list != 0);
|
||||
QVERIFY(ast->asTemplateId()->template_argument_list->value != 0);
|
||||
QVERIFY(ast->asTemplateId()->template_argument_list->value->asNumericLiteral() != 0);
|
||||
QCOMPARE(ast->asTemplateId()->template_argument_list->value->asNumericLiteral()->literal_token, 3U);
|
||||
QVERIFY(ast->asTemplateId()->template_argument_list->next == 0);
|
||||
QCOMPARE(ast->asTemplateId()->greater_token, 4U);
|
||||
}
|
||||
|
||||
@@ -149,9 +149,9 @@ void tst_AST::new_expression_1()
|
||||
QVERIFY(expr->new_type_id != 0);
|
||||
QVERIFY(expr->new_initializer == 0);
|
||||
|
||||
QVERIFY(expr->new_type_id->type_specifier != 0);
|
||||
QVERIFY(expr->new_type_id->ptr_operators == 0);
|
||||
QVERIFY(expr->new_type_id->new_array_declarators == 0);
|
||||
QVERIFY(expr->new_type_id->type_specifier_list != 0);
|
||||
QVERIFY(expr->new_type_id->ptr_operator_list == 0);
|
||||
QVERIFY(expr->new_type_id->new_array_declarator_list == 0);
|
||||
}
|
||||
|
||||
void tst_AST::new_expression_2()
|
||||
@@ -374,7 +374,7 @@ void tst_AST::while_statement()
|
||||
CompoundStatementAST *body_stmt = stmt->statement->asCompoundStatement();
|
||||
QVERIFY(body_stmt != 0);
|
||||
QCOMPARE(body_stmt->lbrace_token, 5U);
|
||||
QVERIFY(body_stmt->statements == 0);
|
||||
QVERIFY(body_stmt->statement_list == 0);
|
||||
QCOMPARE(body_stmt->rbrace_token, 6U);
|
||||
}
|
||||
|
||||
@@ -396,17 +396,17 @@ void tst_AST::while_condition_statement()
|
||||
// check condition
|
||||
ConditionAST *condition = stmt->condition->asCondition();
|
||||
QVERIFY(condition != 0);
|
||||
QVERIFY(condition->type_specifiers != 0);
|
||||
QVERIFY(condition->type_specifiers->value->asSimpleSpecifier() != 0);
|
||||
QCOMPARE(condition->type_specifiers->value->asSimpleSpecifier()->specifier_token, 3U);
|
||||
QVERIFY(condition->type_specifiers->next == 0);
|
||||
QVERIFY(condition->type_specifier_list != 0);
|
||||
QVERIFY(condition->type_specifier_list->value->asSimpleSpecifier() != 0);
|
||||
QCOMPARE(condition->type_specifier_list->value->asSimpleSpecifier()->specifier_token, 3U);
|
||||
QVERIFY(condition->type_specifier_list->next == 0);
|
||||
QVERIFY(condition->declarator != 0);
|
||||
QVERIFY(condition->declarator->core_declarator != 0);
|
||||
QVERIFY(condition->declarator->core_declarator->asDeclaratorId() != 0);
|
||||
QVERIFY(condition->declarator->core_declarator->asDeclaratorId()->name != 0);
|
||||
QVERIFY(condition->declarator->core_declarator->asDeclaratorId()->name->asSimpleName() != 0);
|
||||
QCOMPARE(condition->declarator->core_declarator->asDeclaratorId()->name->asSimpleName()->identifier_token, 4U);
|
||||
QVERIFY(condition->declarator->postfix_declarators == 0);
|
||||
QVERIFY(condition->declarator->postfix_declarator_list == 0);
|
||||
QVERIFY(condition->declarator->initializer != 0);
|
||||
QVERIFY(condition->declarator->initializer->asSimpleName() != 0);
|
||||
QCOMPARE(condition->declarator->initializer->asSimpleName()->identifier_token, 6U);
|
||||
@@ -415,7 +415,7 @@ void tst_AST::while_condition_statement()
|
||||
CompoundStatementAST *body_stmt = stmt->statement->asCompoundStatement();
|
||||
QVERIFY(body_stmt != 0);
|
||||
QCOMPARE(body_stmt->lbrace_token, 8U);
|
||||
QVERIFY(body_stmt->statements == 0);
|
||||
QVERIFY(body_stmt->statement_list == 0);
|
||||
QCOMPARE(body_stmt->rbrace_token, 9U);
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ void tst_AST::for_statement()
|
||||
QVERIFY(stmt->statement != 0);
|
||||
QVERIFY(stmt->statement->asCompoundStatement() != 0);
|
||||
QCOMPARE(stmt->statement->asCompoundStatement()->lbrace_token, 6U);
|
||||
QVERIFY(stmt->statement->asCompoundStatement()->statements == 0);
|
||||
QVERIFY(stmt->statement->asCompoundStatement()->statement_list == 0);
|
||||
QCOMPARE(stmt->statement->asCompoundStatement()->rbrace_token, 7U);
|
||||
}
|
||||
|
||||
@@ -457,13 +457,13 @@ void tst_AST::cpp_initializer_or_function_declaration()
|
||||
SimpleDeclarationAST *simple_decl = stmt->declaration->asSimpleDeclaration();
|
||||
QVERIFY(simple_decl != 0);
|
||||
|
||||
QVERIFY(simple_decl->decl_specifier_seq != 0);
|
||||
QVERIFY(simple_decl->decl_specifier_seq->next == 0);
|
||||
QVERIFY(simple_decl->declarators != 0);
|
||||
QVERIFY(simple_decl->declarators->next == 0);
|
||||
QVERIFY(simple_decl->decl_specifier_list != 0);
|
||||
QVERIFY(simple_decl->decl_specifier_list->next == 0);
|
||||
QVERIFY(simple_decl->declarator_list != 0);
|
||||
QVERIFY(simple_decl->declarator_list->next == 0);
|
||||
QCOMPARE(simple_decl->semicolon_token, 6U);
|
||||
|
||||
NamedTypeSpecifierAST *named_ty = simple_decl->decl_specifier_seq->value->asNamedTypeSpecifier();
|
||||
NamedTypeSpecifierAST *named_ty = simple_decl->decl_specifier_list->value->asNamedTypeSpecifier();
|
||||
QVERIFY(named_ty != 0);
|
||||
QVERIFY(named_ty->name != 0);
|
||||
|
||||
@@ -471,11 +471,11 @@ void tst_AST::cpp_initializer_or_function_declaration()
|
||||
QVERIFY(simple_named_ty != 0);
|
||||
QCOMPARE(simple_named_ty->identifier_token, 1U);
|
||||
|
||||
DeclaratorAST *declarator = simple_decl->declarators->value;
|
||||
DeclaratorAST *declarator = simple_decl->declarator_list->value;
|
||||
QVERIFY(declarator != 0);
|
||||
QVERIFY(declarator->core_declarator != 0);
|
||||
QVERIFY(declarator->postfix_declarators != 0);
|
||||
QVERIFY(declarator->postfix_declarators->next == 0);
|
||||
QVERIFY(declarator->postfix_declarator_list != 0);
|
||||
QVERIFY(declarator->postfix_declarator_list->next == 0);
|
||||
QVERIFY(declarator->initializer == 0);
|
||||
|
||||
DeclaratorIdAST *decl_id = declarator->core_declarator->asDeclaratorId();
|
||||
@@ -484,7 +484,7 @@ void tst_AST::cpp_initializer_or_function_declaration()
|
||||
QVERIFY(decl_id->name->asSimpleName() != 0);
|
||||
QCOMPARE(decl_id->name->asSimpleName()->identifier_token, 2U);
|
||||
|
||||
FunctionDeclaratorAST *fun_declarator = declarator->postfix_declarators->value->asFunctionDeclarator();
|
||||
FunctionDeclaratorAST *fun_declarator = declarator->postfix_declarator_list->value->asFunctionDeclarator();
|
||||
QVERIFY(fun_declarator != 0);
|
||||
QCOMPARE(fun_declarator->lparen_token, 3U);
|
||||
QVERIFY(fun_declarator->parameters != 0);
|
||||
@@ -492,24 +492,24 @@ void tst_AST::cpp_initializer_or_function_declaration()
|
||||
|
||||
// check the formal arguments
|
||||
ParameterDeclarationClauseAST *param_clause = fun_declarator->parameters;
|
||||
QVERIFY(param_clause->parameter_declarations != 0);
|
||||
QVERIFY(param_clause->parameter_declarations->next == 0);
|
||||
QVERIFY(param_clause->parameter_declaration_list != 0);
|
||||
QVERIFY(param_clause->parameter_declaration_list->next == 0);
|
||||
QCOMPARE(param_clause->dot_dot_dot_token, 0U);
|
||||
|
||||
// check the parameter
|
||||
DeclarationListAST *declarations = param_clause->parameter_declarations;
|
||||
DeclarationListAST *declarations = param_clause->parameter_declaration_list;
|
||||
QVERIFY(declarations);
|
||||
QVERIFY(declarations->value);
|
||||
QVERIFY(! declarations->next);
|
||||
|
||||
ParameterDeclarationAST *param = declarations->value->asParameterDeclaration();
|
||||
QVERIFY(param);
|
||||
QVERIFY(param->type_specifier != 0);
|
||||
QVERIFY(param->type_specifier->next == 0);
|
||||
QVERIFY(param->type_specifier->value->asNamedTypeSpecifier() != 0);
|
||||
QVERIFY(param->type_specifier->value->asNamedTypeSpecifier()->name != 0);
|
||||
QVERIFY(param->type_specifier->value->asNamedTypeSpecifier()->name->asSimpleName() != 0);
|
||||
QCOMPARE(param->type_specifier->value->asNamedTypeSpecifier()->name->asSimpleName()->identifier_token, 4U);
|
||||
QVERIFY(param->type_specifier_list != 0);
|
||||
QVERIFY(param->type_specifier_list->next == 0);
|
||||
QVERIFY(param->type_specifier_list->value->asNamedTypeSpecifier() != 0);
|
||||
QVERIFY(param->type_specifier_list->value->asNamedTypeSpecifier()->name != 0);
|
||||
QVERIFY(param->type_specifier_list->value->asNamedTypeSpecifier()->name->asSimpleName() != 0);
|
||||
QCOMPARE(param->type_specifier_list->value->asNamedTypeSpecifier()->name->asSimpleName()->identifier_token, 4U);
|
||||
}
|
||||
|
||||
void tst_AST::objc_attributes_followed_by_at_keyword()
|
||||
@@ -553,7 +553,7 @@ void tst_AST::normal_array_access()
|
||||
FunctionDefinitionAST *func = ast->asFunctionDefinition();
|
||||
QVERIFY(func);
|
||||
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statements;
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statement_list;
|
||||
QVERIFY(bodyStatements);
|
||||
QVERIFY(bodyStatements->next);
|
||||
QVERIFY(bodyStatements->next->next);
|
||||
@@ -573,8 +573,8 @@ void tst_AST::normal_array_access()
|
||||
}
|
||||
|
||||
{
|
||||
QVERIFY(postfixExpr->postfix_expressions && !postfixExpr->postfix_expressions->next);
|
||||
ArrayAccessAST *rhs = postfixExpr->postfix_expressions->value->asArrayAccess();
|
||||
QVERIFY(postfixExpr->postfix_expression_list && !postfixExpr->postfix_expression_list->next);
|
||||
ArrayAccessAST *rhs = postfixExpr->postfix_expression_list->value->asArrayAccess();
|
||||
QVERIFY(rhs && rhs->expression);
|
||||
SimpleNameAST *b = rhs->expression->asSimpleName();
|
||||
QVERIFY(b);
|
||||
@@ -597,7 +597,7 @@ void tst_AST::array_access_with_nested_expression()
|
||||
FunctionDefinitionAST *func = ast->asFunctionDefinition();
|
||||
QVERIFY(func);
|
||||
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statements;
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statement_list;
|
||||
QVERIFY(bodyStatements && bodyStatements->next && bodyStatements->next->next && bodyStatements->next->next->value);
|
||||
ExpressionAST *expr = bodyStatements->next->next->value->asReturnStatement()->expression;
|
||||
QVERIFY(expr);
|
||||
@@ -619,8 +619,8 @@ void tst_AST::array_access_with_nested_expression()
|
||||
}
|
||||
|
||||
{
|
||||
QVERIFY(postfixExpr->postfix_expressions && !postfixExpr->postfix_expressions->next);
|
||||
ArrayAccessAST *rhs = postfixExpr->postfix_expressions->value->asArrayAccess();
|
||||
QVERIFY(postfixExpr->postfix_expression_list && !postfixExpr->postfix_expression_list->next);
|
||||
ArrayAccessAST *rhs = postfixExpr->postfix_expression_list->value->asArrayAccess();
|
||||
QVERIFY(rhs && rhs->expression);
|
||||
SimpleNameAST *b = rhs->expression->asSimpleName();
|
||||
QVERIFY(b);
|
||||
@@ -642,7 +642,7 @@ void tst_AST::objc_msg_send_expression()
|
||||
FunctionDefinitionAST *func = ast->asFunctionDefinition();
|
||||
QVERIFY(func);
|
||||
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statements;
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statement_list;
|
||||
QVERIFY(bodyStatements && bodyStatements->next && !bodyStatements->next->next && bodyStatements->next->value);
|
||||
|
||||
{// check the NSObject declaration
|
||||
@@ -654,8 +654,8 @@ void tst_AST::objc_msg_send_expression()
|
||||
QVERIFY(simpleDecl);
|
||||
|
||||
{// check the type (NSObject)
|
||||
QVERIFY(simpleDecl->decl_specifier_seq && !simpleDecl->decl_specifier_seq->next);
|
||||
NamedTypeSpecifierAST *namedType = simpleDecl->decl_specifier_seq->value->asNamedTypeSpecifier();
|
||||
QVERIFY(simpleDecl->decl_specifier_list && !simpleDecl->decl_specifier_list->next);
|
||||
NamedTypeSpecifierAST *namedType = simpleDecl->decl_specifier_list->value->asNamedTypeSpecifier();
|
||||
QVERIFY(namedType && namedType->name);
|
||||
SimpleNameAST *typeName = namedType->name->asSimpleName();
|
||||
QVERIFY(typeName);
|
||||
@@ -663,22 +663,22 @@ void tst_AST::objc_msg_send_expression()
|
||||
}
|
||||
|
||||
{// check the assignment
|
||||
QVERIFY(simpleDecl->declarators && !simpleDecl->declarators->next);
|
||||
DeclaratorAST *declarator = simpleDecl->declarators->value;
|
||||
QVERIFY(simpleDecl->declarator_list && !simpleDecl->declarator_list->next);
|
||||
DeclaratorAST *declarator = simpleDecl->declarator_list->value;
|
||||
QVERIFY(declarator);
|
||||
QVERIFY(!declarator->attributes);
|
||||
QVERIFY(!declarator->attribute_list);
|
||||
|
||||
QVERIFY(declarator->ptr_operators && !declarator->ptr_operators->next
|
||||
&& declarator->ptr_operators->value->asPointer()
|
||||
&& ! declarator->ptr_operators->value->asPointer()->cv_qualifier_seq);
|
||||
QVERIFY(declarator->ptr_operator_list && !declarator->ptr_operator_list->next
|
||||
&& declarator->ptr_operator_list->value->asPointer()
|
||||
&& ! declarator->ptr_operator_list->value->asPointer()->cv_qualifier_list);
|
||||
|
||||
QVERIFY(declarator->core_declarator && declarator->core_declarator->asDeclaratorId());
|
||||
NameAST *objNameId = declarator->core_declarator->asDeclaratorId()->name;
|
||||
QVERIFY(objNameId && objNameId->asSimpleName());
|
||||
QCOMPARE(QLatin1String(unit->identifier(objNameId->asSimpleName()->identifier_token)->chars()), QLatin1String("obj"));
|
||||
|
||||
QVERIFY(!declarator->postfix_declarators);
|
||||
QVERIFY(!declarator->post_attributes);
|
||||
QVERIFY(!declarator->postfix_declarator_list);
|
||||
QVERIFY(!declarator->post_attribute_list);
|
||||
ExpressionAST *initializer = declarator->initializer;
|
||||
QVERIFY(initializer);
|
||||
|
||||
@@ -729,7 +729,7 @@ void tst_AST::objc_msg_send_expression_without_selector()
|
||||
FunctionDefinitionAST *func = ast->asFunctionDefinition();
|
||||
QVERIFY(func);
|
||||
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statements;
|
||||
StatementListAST *bodyStatements = func->function_body->asCompoundStatement()->statement_list;
|
||||
QVERIFY(bodyStatements && bodyStatements->next);
|
||||
QVERIFY(bodyStatements->next->value);
|
||||
QVERIFY(bodyStatements->next->value->asReturnStatement());
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
Semantic sem(unit->control());
|
||||
TranslationUnitAST *ast = unit->ast()->asTranslationUnit();
|
||||
QVERIFY(ast);
|
||||
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
|
||||
for (DeclarationListAST *decl = ast->declaration_list; decl; decl = decl->next) {
|
||||
sem.check(decl->value, globals);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user