Add a symbol table with type info
This commit is contained in:
@ -63,14 +63,16 @@ namespace gcc
|
||||
return error_mark_node;
|
||||
}
|
||||
|
||||
void do_semantic_analysis(std::shared_ptr<symbol_table> symbols, std::unique_ptr<boot::program>& ast)
|
||||
void do_semantic_analysis(const char *path, std::unique_ptr<boot::program>& ast,
|
||||
std::shared_ptr<symbol_table> symbols)
|
||||
{
|
||||
boot::declaration_visitor declaration_visitor;
|
||||
auto info_table = boot::builtin_symbol_table();
|
||||
boot::declaration_visitor declaration_visitor(path, info_table);
|
||||
|
||||
declaration_visitor.visit(ast.get());
|
||||
for (auto unresolved : declaration_visitor.unresolved)
|
||||
{
|
||||
auto inner_alias = elna::gcc::get_inner_alias(symbols, boot::type(unresolved.second));
|
||||
auto inner_alias = get_inner_alias(symbols, boot::type(unresolved.second));
|
||||
symbols->enter(unresolved.first, inner_alias);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user