mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-31 19:28:15 +00:00
some fixes for zero argument functions, test_code.lang improvements
This commit is contained in:
parent
79bd30c1ee
commit
3188ba6a54
4 changed files with 104 additions and 3 deletions
|
|
@ -597,7 +597,7 @@ void PrintVisitor::Visit(FunctionType* node) {
|
|||
out_ << "[FunctionType] (";
|
||||
bool is_first = true;
|
||||
for (auto& type : node->types) {
|
||||
if (!is_first) {
|
||||
if (!is_first || node->types.size() == 1) {
|
||||
out_ << " -> ";
|
||||
}
|
||||
is_first = false;
|
||||
|
|
|
|||
|
|
@ -849,7 +849,7 @@ void TypedPrintVisitor::Visit(FunctionType* node) {
|
|||
out_ << "] (";
|
||||
bool is_first = true;
|
||||
for (auto& type : node->types) {
|
||||
if (!is_first) {
|
||||
if (!is_first || node->types.size() == 1) {
|
||||
out_ << " -> ";
|
||||
}
|
||||
is_first = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue