forked from qt-creator/qt-creator
Annotated NamespaceAST nodes.
This commit is contained in:
@@ -1194,6 +1194,9 @@ public:
|
|||||||
SpecifierAST *attributes;
|
SpecifierAST *attributes;
|
||||||
DeclarationAST *linkage_body;
|
DeclarationAST *linkage_body;
|
||||||
|
|
||||||
|
public: // annotations
|
||||||
|
Namespace *namespace_symbol;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual unsigned firstToken() const;
|
virtual unsigned firstToken() const;
|
||||||
virtual unsigned lastToken() const;
|
virtual unsigned lastToken() const;
|
||||||
|
@@ -286,6 +286,7 @@ bool CheckDeclaration::visit(NamespaceAST *ast)
|
|||||||
Identifier *id = identifier(ast->identifier_token);
|
Identifier *id = identifier(ast->identifier_token);
|
||||||
Name *namespaceName = control()->nameId(id);
|
Name *namespaceName = control()->nameId(id);
|
||||||
Namespace *ns = control()->newNamespace(ast->firstToken(), namespaceName);
|
Namespace *ns = control()->newNamespace(ast->firstToken(), namespaceName);
|
||||||
|
ast->namespace_symbol = ns;
|
||||||
_scope->enterSymbol(ns);
|
_scope->enterSymbol(ns);
|
||||||
semantic()->check(ast->linkage_body, ns->members()); // ### we'll do the merge later.
|
semantic()->check(ast->linkage_body, ns->members()); // ### we'll do the merge later.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user