Commit 3ac4e05e authored by Roberto Raggi's avatar Roberto Raggi

Annotated NamespaceAST nodes.

parent 34efcf31
......@@ -1194,6 +1194,9 @@ public:
SpecifierAST *attributes;
DeclarationAST *linkage_body;
public: // annotations
Namespace *namespace_symbol;
public:
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment