mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-24 07:48:46 +00:00
result / optional return type modifiers for functions (one for all returns)
This commit is contained in:
parent
68463509d8
commit
195a26f9b7
10 changed files with 74 additions and 36 deletions
|
|
@ -143,7 +143,7 @@ void print_function_definition(const nodes::FunctionDefinition &statement,
|
|||
printer.new_indent_line();
|
||||
}
|
||||
|
||||
switch (statement.get_modifier()) {
|
||||
switch (statement.get_method_modifier()) {
|
||||
case nodes::FunctionDefinition::STATIC:
|
||||
break;
|
||||
case nodes::FunctionDefinition::LET:
|
||||
|
|
@ -169,6 +169,8 @@ void print_function_definition(const nodes::FunctionDefinition &statement,
|
|||
printer.print(" )");
|
||||
}
|
||||
|
||||
print_modifier(statement.get_return_modifier(), printer);
|
||||
|
||||
for (size_t i = 0; i < statement.get_arguments_size(); ++i) {
|
||||
if (!statement.get_argument(i)->get_name().has_value()) {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue