mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-17 20:38:44 +00:00
changes for new grammar, fixes
This commit is contained in:
parent
91f9affadc
commit
3106a64949
35 changed files with 605 additions and 550 deletions
|
|
@ -48,7 +48,7 @@ int main(int argc, char** argv) { // TODO, only test version
|
|||
info::ContextManager<info::value::Value, info::value::ValueManager> context_manager;
|
||||
|
||||
interpreter::BuildVisitor build_visitor(parse_tree);
|
||||
// interpreter::PrintVisitor print_visitor(std::cout);
|
||||
interpreter::PrintVisitor print_visitor(std::cout);
|
||||
interpreter::FindSymbolsVisitor find_symbols_visitor(global_info);
|
||||
interpreter::LinkSymbolsVisitor link_symbols_visitor(global_info);
|
||||
interpreter::TypeCheckVisitor type_check_visitor(global_info, type_context_manager);
|
||||
|
|
@ -56,8 +56,8 @@ int main(int argc, char** argv) { // TODO, only test version
|
|||
|
||||
build_visitor.VisitSourceFile(source_file.get());
|
||||
|
||||
// std::cout << "\n---------------------------------- Untyped -------------------------------------\n\n";
|
||||
// print_visitor.VisitSourceFile(source_file.get());
|
||||
std::cout << "\n---------------------------------- Untyped -------------------------------------\n\n";
|
||||
print_visitor.VisitSourceFile(source_file.get());
|
||||
|
||||
try {
|
||||
find_symbols_visitor.VisitSourceFile(source_file.get());
|
||||
|
|
@ -69,7 +69,7 @@ int main(int argc, char** argv) { // TODO, only test version
|
|||
|
||||
try {
|
||||
type_check_visitor.VisitSourceFile(source_file.get());
|
||||
} catch (bool) { error_handling::HandleInternalError("type_check_visitor exception", "main", std::nullopt); }
|
||||
} catch (...) { error_handling::HandleInternalError("type_check_visitor exception", "main", std::nullopt); }
|
||||
|
||||
std::optional<utils::IdType> maybe_main_partition_id = global_info.FindPartition({"main"});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue