Commit b5a6ee19 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Process template declarations.

parent 16adcf31
...@@ -1862,15 +1862,23 @@ bool Bind::visit(ParameterDeclarationAST *ast) ...@@ -1862,15 +1862,23 @@ bool Bind::visit(ParameterDeclarationAST *ast)
bool Bind::visit(TemplateDeclarationAST *ast) bool Bind::visit(TemplateDeclarationAST *ast)
{ {
// unsigned export_token = ast->export_token; Template *templ = control()->newTemplate(ast->firstToken(), 0);
// unsigned template_token = ast->template_token; ast->symbol = templ;
// unsigned less_token = ast->less_token; Scope *previousScope = switchScope(templ);
for (DeclarationListAST *it = ast->template_parameter_list; it; it = it->next) { for (DeclarationListAST *it = ast->template_parameter_list; it; it = it->next) {
this->declaration(it->value); this->declaration(it->value);
} }
// unsigned greater_token = ast->greater_token; // unsigned greater_token = ast->greater_token;
this->declaration(ast->declaration); this->declaration(ast->declaration);
// Template *symbol = ast->symbol; (void) switchScope(previousScope);
if (Symbol *decl = templ->declaration()) {
templ->setSourceLocation(decl->sourceLocation(), translationUnit());
templ->setName(decl->name());
}
_scope->addMember(templ);
return false; return false;
} }
......
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