diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-02-09 12:00:06 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-02-09 12:00:06 +0100 |
commit | 3ac4e05e374fe91891d27b240b60ea91308d7184 (patch) | |
tree | 16436d0a6f9afe937d2bf04b8124c20d56aff9d5 /src/shared | |
parent | 34efcf3194388784e71bbf165518f1e92f344403 (diff) | |
download | qt-creator-3ac4e05e374fe91891d27b240b60ea91308d7184.tar.gz |
Annotated NamespaceAST nodes.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/cplusplus/AST.h | 3 | ||||
-rw-r--r-- | src/shared/cplusplus/CheckDeclaration.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h index ecb0ddc3fb..0b957ede81 100644 --- a/src/shared/cplusplus/AST.h +++ b/src/shared/cplusplus/AST.h @@ -1194,6 +1194,9 @@ public: SpecifierAST *attributes; DeclarationAST *linkage_body; +public: // annotations + Namespace *namespace_symbol; + public: virtual unsigned firstToken() const; virtual unsigned lastToken() const; diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp index 610d57626f..48e6cd40fa 100644 --- a/src/shared/cplusplus/CheckDeclaration.cpp +++ b/src/shared/cplusplus/CheckDeclaration.cpp @@ -286,6 +286,7 @@ bool CheckDeclaration::visit(NamespaceAST *ast) Identifier *id = identifier(ast->identifier_token); Name *namespaceName = control()->nameId(id); Namespace *ns = control()->newNamespace(ast->firstToken(), namespaceName); + ast->namespace_symbol = ns; _scope->enterSymbol(ns); semantic()->check(ast->linkage_body, ns->members()); // ### we'll do the merge later. |