diff --git a/libs/ast/source/print.cpp b/libs/ast/source/print.cpp index 913ee3a..3cb639b 100644 --- a/libs/ast/source/print.cpp +++ b/libs/ast/source/print.cpp @@ -52,7 +52,7 @@ namespace pslang::ast void apply(function_type const & type) { - if (type.arguments.size() == 1) + if (type.arguments.size() == 1 && !std::get_if(type.arguments[0].get())) { apply(*type.arguments.front()); out << " -> "; diff --git a/libs/types/source/print.cpp b/libs/types/source/print.cpp index cf1a62c..774e997 100644 --- a/libs/types/source/print.cpp +++ b/libs/types/source/print.cpp @@ -87,7 +87,7 @@ namespace pslang::types void apply(function_type const & type) { - if (type.arguments.size() == 1) + if (type.arguments.size() == 1 && !is_function_type(*type.arguments[0])) { apply(*type.arguments.front()); out << " -> "; diff --git a/plans.txt b/plans.txt index 5bf4e82..c31087b 100644 --- a/plans.txt +++ b/plans.txt @@ -40,3 +40,7 @@ General backlog: * Mutually recursive structs (relevant only with pointers) * Empty array expression * Calling functions as methods +* Replace std::runtime_error with appropriate custom exception types +* Replace std::ostringstream with std::format +* TEST COVERAGE!!! +* Separate actual AST from pre-AST (the one before indentation & scoping is resolved)