forked from qt-creator/qt-creator
Renamed DeclaratorAST::equals_token
This commit is contained in:
@@ -629,7 +629,7 @@ public:
|
|||||||
if (! op->core)
|
if (! op->core)
|
||||||
return noResult();
|
return noResult();
|
||||||
|
|
||||||
else if (! declarator->equals_token)
|
else if (! declarator->equal_token)
|
||||||
return noResult();
|
return noResult();
|
||||||
|
|
||||||
else if (! declarator->initializer)
|
else if (! declarator->initializer)
|
||||||
|
@@ -896,8 +896,8 @@ unsigned DeclaratorAST::firstToken() const
|
|||||||
if (post_attribute_list)
|
if (post_attribute_list)
|
||||||
if (unsigned candidate = post_attribute_list->firstToken())
|
if (unsigned candidate = post_attribute_list->firstToken())
|
||||||
return candidate;
|
return candidate;
|
||||||
if (equals_token)
|
if (equal_token)
|
||||||
return equals_token;
|
return equal_token;
|
||||||
if (initializer)
|
if (initializer)
|
||||||
if (unsigned candidate = initializer->firstToken())
|
if (unsigned candidate = initializer->firstToken())
|
||||||
return candidate;
|
return candidate;
|
||||||
@@ -910,8 +910,8 @@ unsigned DeclaratorAST::lastToken() const
|
|||||||
if (initializer)
|
if (initializer)
|
||||||
if (unsigned candidate = initializer->lastToken())
|
if (unsigned candidate = initializer->lastToken())
|
||||||
return candidate;
|
return candidate;
|
||||||
if (equals_token)
|
if (equal_token)
|
||||||
return equals_token + 1;
|
return equal_token + 1;
|
||||||
if (post_attribute_list)
|
if (post_attribute_list)
|
||||||
if (unsigned candidate = post_attribute_list->lastToken())
|
if (unsigned candidate = post_attribute_list->lastToken())
|
||||||
return candidate;
|
return candidate;
|
||||||
|
@@ -574,7 +574,7 @@ public:
|
|||||||
CoreDeclaratorAST *core_declarator;
|
CoreDeclaratorAST *core_declarator;
|
||||||
PostfixDeclaratorListAST *postfix_declarator_list;
|
PostfixDeclaratorListAST *postfix_declarator_list;
|
||||||
SpecifierListAST *post_attribute_list;
|
SpecifierListAST *post_attribute_list;
|
||||||
unsigned equals_token;
|
unsigned equal_token;
|
||||||
ExpressionAST *initializer;
|
ExpressionAST *initializer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -584,7 +584,7 @@ public:
|
|||||||
, core_declarator(0)
|
, core_declarator(0)
|
||||||
, postfix_declarator_list(0)
|
, postfix_declarator_list(0)
|
||||||
, post_attribute_list(0)
|
, post_attribute_list(0)
|
||||||
, equals_token(0)
|
, equal_token(0)
|
||||||
, initializer(0)
|
, initializer(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@@ -119,7 +119,7 @@ DeclaratorAST *DeclaratorAST::clone(MemoryPool *pool) const
|
|||||||
for (SpecifierListAST *iter = post_attribute_list, **ast_iter = &ast->post_attribute_list;
|
for (SpecifierListAST *iter = post_attribute_list, **ast_iter = &ast->post_attribute_list;
|
||||||
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
|
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
|
||||||
*ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
|
*ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
|
||||||
ast->equals_token = equals_token;
|
ast->equal_token = equal_token;
|
||||||
if (initializer)
|
if (initializer)
|
||||||
ast->initializer = initializer->clone(pool);
|
ast->initializer = initializer->clone(pool);
|
||||||
return ast;
|
return ast;
|
||||||
|
@@ -175,7 +175,7 @@ bool ASTMatcher::match(DeclaratorAST *node, DeclaratorAST *pattern)
|
|||||||
else if (! AST::match(node->post_attribute_list, pattern->post_attribute_list, this))
|
else if (! AST::match(node->post_attribute_list, pattern->post_attribute_list, this))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
pattern->equals_token = node->equals_token;
|
pattern->equal_token = node->equal_token;
|
||||||
|
|
||||||
if (! pattern->initializer)
|
if (! pattern->initializer)
|
||||||
pattern->initializer = node->initializer;
|
pattern->initializer = node->initializer;
|
||||||
|
@@ -1737,7 +1737,7 @@ bool Bind::visit(SimpleDeclarationAST *ast)
|
|||||||
if (Function *funTy = decl->type()->asFunctionType()) {
|
if (Function *funTy = decl->type()->asFunctionType()) {
|
||||||
funTy->setMethodKey(_methodKey);
|
funTy->setMethodKey(_methodKey);
|
||||||
|
|
||||||
if (funTy->isVirtual() && it->value->equals_token)
|
if (funTy->isVirtual() && it->value->equal_token)
|
||||||
funTy->setPureVirtual(true);
|
funTy->setPureVirtual(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1303,7 +1303,7 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, bool stopAtCppInitializer)
|
|||||||
ExpressionAST *initializer = 0;
|
ExpressionAST *initializer = 0;
|
||||||
|
|
||||||
bool blocked = blockErrors(true);
|
bool blocked = blockErrors(true);
|
||||||
if (parseInitializer(initializer, &node->equals_token)) {
|
if (parseInitializer(initializer, &node->equal_token)) {
|
||||||
NestedExpressionAST *expr = 0;
|
NestedExpressionAST *expr = 0;
|
||||||
if (initializer)
|
if (initializer)
|
||||||
expr = initializer->asNestedExpression();
|
expr = initializer->asNestedExpression();
|
||||||
@@ -2296,7 +2296,7 @@ bool Parser::parseInitDeclarator(DeclaratorAST *&node,
|
|||||||
}
|
}
|
||||||
rewind(colon_token);
|
rewind(colon_token);
|
||||||
} else if (LA() == T_EQUAL || (! acceptStructDeclarator && LA() == T_LPAREN)) {
|
} else if (LA() == T_EQUAL || (! acceptStructDeclarator && LA() == T_LPAREN)) {
|
||||||
parseInitializer(node->initializer, &node->equals_token);
|
parseInitializer(node->initializer, &node->equal_token);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2853,7 +2853,7 @@ bool Parser::isPointerDeclaration(DeclarationStatementAST *ast) const
|
|||||||
if (spec->value->asNamedTypeSpecifier() && ! spec->next) {
|
if (spec->value->asNamedTypeSpecifier() && ! spec->next) {
|
||||||
if (DeclaratorListAST *declarators = declaration->declarator_list) {
|
if (DeclaratorListAST *declarators = declaration->declarator_list) {
|
||||||
if (DeclaratorAST *declarator = declarators->value) {
|
if (DeclaratorAST *declarator = declarators->value) {
|
||||||
if (declarator->ptr_operator_list && declarator->equals_token && declarator->initializer) {
|
if (declarator->ptr_operator_list && declarator->equal_token && declarator->initializer) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2952,7 +2952,7 @@ bool Parser::parseCondition(ExpressionAST *&node)
|
|||||||
if (parseTypeSpecifier(type_specifier)) {
|
if (parseTypeSpecifier(type_specifier)) {
|
||||||
DeclaratorAST *declarator = 0;
|
DeclaratorAST *declarator = 0;
|
||||||
if (parseInitDeclarator(declarator, /*acceptStructDeclarator=*/false)) {
|
if (parseInitDeclarator(declarator, /*acceptStructDeclarator=*/false)) {
|
||||||
if (declarator->initializer && declarator->equals_token) {
|
if (declarator->initializer && declarator->equal_token) {
|
||||||
ConditionAST *ast = new (_pool) ConditionAST;
|
ConditionAST *ast = new (_pool) ConditionAST;
|
||||||
ast->type_specifier_list = type_specifier;
|
ast->type_specifier_list = type_specifier;
|
||||||
ast->declarator = declarator;
|
ast->declarator = declarator;
|
||||||
|
Reference in New Issue
Block a user