diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-03-22 21:08:34 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-03-22 21:08:34 +0330 |
commit | 8d56cd69d565ad32467281dd36fd33ec48f32f61 (patch) | |
tree | 738242c562bf3bd60ae349e40e4a92507d17c336 /src/compiler/ast-tree.c | |
parent | 62cd39836fd1237c5f432a629542eb511e5f9cb7 (diff) |
some reordering
Diffstat (limited to 'src/compiler/ast-tree.c')
-rw-r--r-- | src/compiler/ast-tree.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/ast-tree.c b/src/compiler/ast-tree.c index 890d159..111265f 100644 --- a/src/compiler/ast-tree.c +++ b/src/compiler/ast-tree.c @@ -1176,11 +1176,6 @@ AstTree *astTreeParseFunction(ParserNode *parserNode, AstTreeHelper *p_helper) { .globalDeps = p_helper->globalDeps, }; - if ((function->returnType = - astTreeParse(node_metadata->returnType, &helper)) == NULL) { - goto RETURN_ERROR; - } - for (size_t i = 0; i < node_arguments->size; ++i) { ParserNode *arg = node_arguments->data[i]; if (arg->token == PARSER_TOKEN_SYMBOL_COMMA) { @@ -1212,6 +1207,11 @@ AstTree *astTreeParseFunction(ParserNode *parserNode, AstTreeHelper *p_helper) { } } + if ((function->returnType = + astTreeParse(node_metadata->returnType, &helper)) == NULL) { + goto RETURN_ERROR; + } + for (size_t i = 0; i < body->size; ++i) { ParserNode *node = body->data[i]; switch (node->token) { |