From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id AI/AHp4eF2fofAEA62LTzQ:P1 (envelope-from ) for ; Tue, 22 Oct 2024 05:40:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AI/AHp4eF2fofAEA62LTzQ (envelope-from ) for ; Tue, 22 Oct 2024 05:40:14 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=M6J4QZgR; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b="ahpAlx/i"; dmarc=pass (policy=none) header.from=maniero.me; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; arc=pass ("mailchannels.net:s=arc-2022:i=1") ARC-Seal: i=2; s=key1; d=johnnyrichard.com; t=1729568414; a=rsa-sha256; cv=pass; b=fk54yBSPU8hUE40TKsrmoE7/SRDiSZSOIepj3W67TM5Givi0c6tNHjrfdJZts0y97NpmMZ u8WuJMkE+jcdm1PdyMFjIfQiZmcu8yIEuQMXMyic3B3Ix4iARH9BxqZ51cVr9aoRxeJE/6 6tGgkm9xBleqyT3/tLAPpMEQhg+7mjksqkbN0Ihw3TlOxghtvTI3/wGEWp8tSmr0DsiNuA 5gv/coBlUyP0EwmshLxNUwq4YTJtUHs2SumT1zzAfxLPky74rD4UdeXplglHFGz1lsaXph RzRvO3KDhvNELm1TxO18l3zvEllWNqKiF5u6mFMCS21ylo+jZu96ryMnue8XbQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=M6J4QZgR; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b="ahpAlx/i"; dmarc=pass (policy=none) header.from=maniero.me; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; arc=pass ("mailchannels.net:s=arc-2022:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1729568414; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2UvmuQoF8SY1yOWHs1Ui9ZNQle/4HmeK2iLh5RDPQng=; b=pFboFxjMRQG9QEslfd41rxEgqtRk4iMnLtxi1kTk4RazwZpvZBjPcnshYFywU/HJf+LH6I TA6E2ioScMkxq1ycICA9u+hGddjtsjvFiLz0CbAULCVeS/no1PRe6bJY80ERQciqIS6waf FPD6uwTi5p0/3bmFxWhgNYrCO20S+apZbGziPek6UEGs5G2zDwniIWQYIzPF5AeFeMRBax lyxQKUoPyDhjIviRS+WzYIygZUupduwryV6ceNhufy+AcD5TBuKfqA/1tL4c4gGDkk84eb 7s2D3XMf4tAojhwy7gqgRx+mcIdsR92jVkaLB9+WC/lCc1ya00xUWyLtd1vLQg== Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 05D6F1FFAD for ; Tue, 22 Oct 2024 05:40:10 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=6jj11HSiy/0+t//c7Lzz3QmWShuEbaphzlia+KyxnR8=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:Date:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1729568404; v=1; b=M6J4QZgRD1om5UHj8MwOQt8tJJChugULEOWajjywMA8gc16bQaKtFOzple1HrKr/ucH+R/dh KT1ZYz6nY8GaetrEiWqTOFPWzZaUJ1Po4qy5xBrGILH9zlPYZEz/NFr5XNGGRk8XEdfdtCzJuRR CLWm8XcckHNwFevR/8aaMbL07Ljd6wtng1irbgYLLZZ4SFx92DrOcM6jVBuxe+/fQgwrYFifIE2 lNEZzEOzuORyBk5tpNsW4ZQTpqoZQawTPUbrvhto1qV6eMkgEXTdowaVcvbULpNkRT1hFl6GmCC aevsbm6KlZuw9mHOnTYKlNBPtgUU0ZiBpd13XIPR3UmDA== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 1ABA6202A5 for ; Tue, 22 Oct 2024 03:40:04 +0000 (UTC) Received: from buffalo.tulip.relay.mailchannels.net (buffalo.tulip.relay.mailchannels.net [23.83.218.24]) by mail-a.sr.ht (Postfix) with ESMTPS id CCB4F20281 for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 22 Oct 2024 03:39:58 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 00DDD90252D for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 22 Oct 2024 03:39:57 +0000 (UTC) Received: from nl-srv-smtpout1.hostinger.io (trex-2.trex.outbound.svc.cluster.local [100.99.173.91]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 1E53B9014B8 for <~johnnyrichard/olang-devel@lists.sr.ht>; Tue, 22 Oct 2024 03:39:55 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1729568396; a=rsa-sha256; cv=none; b=kg6IHCT0AizSZzKuaY1B4C7N3bzDDkWcCW8GfCR0gQNcyW3rfL5Rtw4hiHzZnvom9QWmap M5mUwlBH26EjAmJeno6NgwK5EYQ7DmBsKDmvuI4EprP1bdNp6MILUC/+ErCsMSvtmh4jJC Z4TWoWuuTNlu3/QrbEqhP7blzY6L5qqw9mUg+IwXfOgjiatDhmjioQjHl1MLu3rzr8YD7F mx3H+Vm2kJm0ly+9ndFOj+Y2B0fTpIKxWHJc2B7PXRDAMA/iGsci82STnPiAM4aXG6JSAm BGFhuGz7WyEjfsyMJqsy7IxD2pc/0wpzLUX/1/JbjvGAxrvQVqAEbOA8glB48g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1729568396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=2UvmuQoF8SY1yOWHs1Ui9ZNQle/4HmeK2iLh5RDPQng=; b=ohtB0S7ad8WVUm8JcYNAvvW60MA5mgZveIWzQ6R0Y5K21iUfOKlcfij5GttAGhitM0jrGT j5OHsJdqxa07E8xwU51QD8VRwNOMTt2I2X3Ez0RSx7+OfhwQkHE6dGw7C62GBnQKcU1hbK ZGvcCwC2DVHHhfpz49pp7FunlRB2XeamxusU59HGx6uUcPkRG9GnMiCmlbTJ4rmg/4AYVd kUZG7MnO9UiWjGil4yAurPZCUK65cY93RxjYcqcdlS0neQ6WbpzmImboocDWaYA3X814rj ChNoNpTrY/h9M9b8VfZ8Iuh01UfCpJoyRHByGHezTZM0fRmucTmY9j4Q9X2TVw== ARC-Authentication-Results: i=1; rspamd-75d86777c9-55c8x; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Inform-Daffy: 61b283e0173826a7_1729568396827_2357027971 X-MC-Loop-Signature: 1729568396827:4144563747 X-MC-Ingress-Time: 1729568396827 Received: from nl-srv-smtpout1.hostinger.io (nl-srv-smtpout1.hostinger.io [145.14.150.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.99.173.91 (trex/7.0.2); Tue, 22 Oct 2024 03:39:56 +0000 From: Carlos Maniero DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1729568394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2UvmuQoF8SY1yOWHs1Ui9ZNQle/4HmeK2iLh5RDPQng=; b=ahpAlx/ikls2M6mVSbXZCt6RYXfW4WGePKIHS4iDnxLY5zRoVoXuzoC+bzGdW5lw2tUIZo BLl/PkFBttizjYHoQ/gOI1KHn/zWN3QVEAvgpR6odOy2ofEZz5P9J8hvb0ivj7jRlOajDS C0zxV818Pr144fHY1oEs2/seNIH2WapusvodzMd1RRiyrdiCZ2hI1BqlgslU3OqPDXlpfW OczUy0APXMPomEpwro+cnfi3Xp2pAOPmYuVF4lq6e9XD2fwLKbIFeadme51m0CnqfiGkbd 54UWoQBGat807hEOmSEXbPoWDVFxggpqtiWFB1yBSAmMVUvs/Tai4QRhksVEqQ== To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Carlos Maniero Subject: [PATCH olang v0] proposal: checker: set the eval type at the binary op expression Message-ID: <20241022033942.39374-1-carlos@maniero.me> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Tue, 22 Oct 2024 03:39:53 +0000 (UTC) X-CM-Analysis: v=2.4 cv=VemlP0p9 c=1 sm=1 tr=0 ts=67171e8a a=WwxFCuf3mf1fs3oSi6/dng==:117 a=WwxFCuf3mf1fs3oSi6/dng==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=Tl7ic1c1faB2pP9wl54A:9 a=BXDaF_L80NY05PYiAFlV:22 X-CM-Envelope: MS4xfIrg3R7ULS4DPcmYgaLFaQEYfcbXsoMdMrYFAI0E7MT7bu1q24EPdiiRusUd5QT7QYMRdfRjqxdqVwYecPqt009jLzgSfWS5OWaV9DjJ4xtMEQ7lhut/ Rnqmmu3j+H9dyMuk4nIcl1wZnKd+csrrlq0jgVgseYtjCE2950AJgtQgaScOtJFTitDwkn1KCsS/AGG6gPqfqIeWuflYchMSAPhcjcvKds4Gb3X0mXgPMzbO X-AuthUser: carlos@maniero.me X-Sourcehut-Patchset-Status: PROPOSED List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Spam-Score: -0.76 X-Spam-Score: -0.76 X-Migadu-Queue-Id: 05D6F1FFAD X-Migadu-Scanner: mx12.migadu.com X-TUID: yGAOT6pxz1IZ I'm sending this patch to discuss how we can prepare our AST to handle typing errors and to improve our codegen. NOTICE: This is not a patch that should be applied; this is a proposal so that we can understand what works or not and which path we will follow. ISSUE STATEMENT =============== In my previous patchset, I had to identify what was the return type of a deref operator (*), the main issue is, if I have a pointer of type (u8**), if it is dereferenced one, it returns the type "u8*" if it is dereferenced twice, it returns (u8). But our AST does not provide this information, meaning that the codegen needs to handle this logic. MY PROPOSAL =========== To add an new attribute on all the called *eval_type*, this attribute will hold the type that the expression will produce. Why? ---- - It simplifies the codegen - There is a need to know the expressions result anyway for type checking. HOW CLANG HANDLES IT? ===================== I wrote the follow program in c: int main() { return 1 + 2; } The AST was the following: `-FunctionDecl 0x55fb061d90f8 line:1:5 main 'int ()' `-CompoundStmt 0x55fb061d9258 `-ReturnStmt 0x55fb061d9248 `-BinaryOperator 0x55fb061d9228 'int' '+' |-IntegerLiteral 0x55fb061d91e8 'int' 1 `-IntegerLiteral 0x55fb061d9208 'int' 2 If you take a closer look at the BinaryyOperator, you will see it specifies the operation result 'int' `-BinaryOperator 0x55fb061d9228 'int' '+' ALTERNATIVES: ============= - Make all ast_node_t to have an eval type. - This will require nodes like fn_def, translation_unit, if, while to have void eval_type, since they do not result anything. But this is confusing to have a function that has a "return_type" but doesn't have an "eval_type". CONSIDERATIONS: =============== 1) I don't like the term eval_type, alternatives: result_type, expr_type. 2) We can use the populate_scope to make this as per my commit does, I like it because it does not require traversing the AST twice, although the name populate_scope no longer makes sense. Signed-off-by: Carlos Maniero --- src/ast.h | 1 + src/checker.c | 53 ++++++++++++++-------- src/codegen_x86_64.c | 3 ++ src/main.c | 3 ++ src/pretty_print_ast.c | 8 +++- src/type.c | 14 ++++++ src/type.h | 4 ++ tests/olc/0002_binary_operator_addition.ol | 11 +++++ tests/olc/0028_function_call.ol | 2 +- tests/olc/0030_while_statement.ol | 2 +- 10 files changed, 80 insertions(+), 21 deletions(-) diff --git a/src/ast.h b/src/ast.h index e7d8ed8..7992045 100644 --- a/src/ast.h +++ b/src/ast.h @@ -146,6 +146,7 @@ typedef struct ast_binary_op { ast_node_meta_t meta; ast_binary_op_kind_t kind; + type_t *eval_type; ast_node_t *lhs; ast_node_t *rhs; } ast_binary_op_t; diff --git a/src/checker.c b/src/checker.c index 02341cc..90117d0 100644 --- a/src/checker.c +++ b/src/checker.c @@ -21,7 +21,10 @@ #include static void -populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast); +populate_scope(checker_t *checker, + scope_t *scope, + ast_node_t *ast, + type_t *eval_type); checker_t * checker_new(arena_t *arena) @@ -86,6 +89,7 @@ type_resolve(type_t *type) case TYPE_PTR: type_resolve(type->as_ptr.type); case TYPE_PRIMITIVE: + case TYPE_VOID: break; } } @@ -97,13 +101,16 @@ checker_check(checker_t *checker, ast_node_t *ast) assert(ast); scope_t *scope = scope_new(checker->arena); - populate_scope(checker, scope, ast); + populate_scope(checker, scope, ast, type_void()); // TODO: traverse the ast tree to verify semantics } static void -populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) +populate_scope(checker_t *checker, + scope_t *scope, + ast_node_t *ast, + type_t *eval_type) { assert(checker); assert(scope); @@ -113,7 +120,8 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) list_item_t *item = list_head(ast->as_translation_unit.decls); while (item != NULL) { - populate_scope(checker, scope, (ast_node_t *)item->value); + populate_scope( + checker, scope, (ast_node_t *)item->value, eval_type); item = list_next(item); } return; @@ -124,8 +132,10 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) fn_def->scope = scope_push(scope); type_resolve(fn_def->return_type); + symbol_t *symbol = symbol_new(checker->arena, fn_def->id, fn_def->return_type); + scope_insert(scope, symbol); list_item_t *item = list_head(fn_def->params); @@ -142,7 +152,10 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) } if (ast->as_fn_def.block != NULL) { - populate_scope(checker, fn_def->scope, ast->as_fn_def.block); + populate_scope(checker, + fn_def->scope, + ast->as_fn_def.block, + fn_def->return_type); } return; } @@ -153,7 +166,8 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) list_item_t *item = list_head(ast->as_fn_call.args); while (item != NULL) { - populate_scope(checker, scope, (ast_node_t *)item->value); + populate_scope( + checker, scope, (ast_node_t *)item->value, eval_type); item = list_next(item); } @@ -161,42 +175,44 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) } case AST_NODE_IF_STMT: { - populate_scope(checker, scope, ast->as_if_stmt.cond); - populate_scope(checker, scope, ast->as_if_stmt.then); + populate_scope(checker, scope, ast->as_if_stmt.cond, eval_type); + populate_scope(checker, scope, ast->as_if_stmt.then, eval_type); if (ast->as_if_stmt._else) { - populate_scope(checker, scope, ast->as_if_stmt._else); + populate_scope( + checker, scope, ast->as_if_stmt._else, eval_type); } return; } case AST_NODE_WHILE_STMT: { - populate_scope(checker, scope, ast->as_while_stmt.cond); - populate_scope(checker, scope, ast->as_while_stmt.then); + populate_scope(checker, scope, ast->as_while_stmt.cond, eval_type); + populate_scope(checker, scope, ast->as_while_stmt.then, eval_type); return; } case AST_NODE_BINARY_OP: { - ast_binary_op_t bin_op = ast->as_bin_op; + ast->as_bin_op.eval_type = eval_type; + assert(eval_type); - populate_scope(checker, scope, bin_op.lhs); - populate_scope(checker, scope, bin_op.rhs); + populate_scope(checker, scope, ast->as_bin_op.lhs, eval_type); + populate_scope(checker, scope, ast->as_bin_op.rhs, eval_type); return; } case AST_NODE_UNARY_OP: { ast_unary_op_t unary_op = ast->as_unary_op; - populate_scope(checker, scope, unary_op.expr); + populate_scope(checker, scope, unary_op.expr, eval_type); return; } case AST_NODE_RETURN_STMT: { ast_return_stmt_t return_stmt = ast->as_return_stmt; - populate_scope(checker, scope, return_stmt.expr); + populate_scope(checker, scope, return_stmt.expr, eval_type); return; } @@ -207,7 +223,8 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) list_item_t *item = list_head(block.nodes); while (item != NULL) { - populate_scope(checker, scope, (ast_node_t *)item->value); + populate_scope( + checker, scope, (ast_node_t *)item->value, eval_type); item = list_next(item); } @@ -225,7 +242,7 @@ populate_scope(checker_t *checker, scope_t *scope, ast_node_t *ast) scope_insert(scope, symbol); ast->as_var_def.scope = scope; - populate_scope(checker, scope, ast->as_var_def.value); + populate_scope(checker, scope, ast->as_var_def.value, eval_type); return; } diff --git a/src/codegen_x86_64.c b/src/codegen_x86_64.c index 4213571..3361510 100644 --- a/src/codegen_x86_64.c +++ b/src/codegen_x86_64.c @@ -913,6 +913,9 @@ type_to_bytes(type_t *type) assert(0 && "cannot calculate size of an unknown type: probably a " "parser issue."); } + case TYPE_VOID: { + return 0; + } } assert(0 && "unreachable"); diff --git a/src/main.c b/src/main.c index 685d8ce..08a0918 100644 --- a/src/main.c +++ b/src/main.c @@ -116,6 +116,9 @@ handle_dump_ast(cli_opts_t *opts) ast_node_t *ast = parser_parse_translation_unit(&parser); + checker_t *checker = checker_new(&arena); + checker_check(checker, ast); + pretty_print_ast(ast); } diff --git a/src/pretty_print_ast.c b/src/pretty_print_ast.c index d476370..258e040 100644 --- a/src/pretty_print_ast.c +++ b/src/pretty_print_ast.c @@ -318,7 +318,13 @@ ast_node_to_pretty_print_node(ast_node_t *ast, arena_t *arena) switch (binop.kind) { case AST_BINOP_ADDITION: { - node->name = "Binary_Operation (+)"; + char name[256]; + sprintf(name, + "Binary_Operation (+) ", + SV_ARG(ast->as_bin_op.eval_type->id)); + node->name = (char *)arena_alloc( + arena, sizeof(char) * (strlen(name) + 1)); + strcpy(node->name, name); break; } case AST_BINOP_SUBTRACTION: { diff --git a/src/type.c b/src/type.c index 4a8d6f4..241e57c 100644 --- a/src/type.c +++ b/src/type.c @@ -17,6 +17,9 @@ #include "type.h" #include "assert.h" +char *void_str = "void"; +type_t global_void_type; + type_t * type_new_unknown(arena_t *arena, string_view_t id) { @@ -39,3 +42,14 @@ type_new_ptr(arena_t *arena, string_view_t id, type_t *ref_type) type->as_ptr.type = ref_type; return type; } + +type_t * +type_void() +{ + if (global_void_type.id.chars != void_str) { + global_void_type.id.chars = void_str; + global_void_type.id.size = 4; + global_void_type.kind = TYPE_VOID; + } + return &global_void_type; +} diff --git a/src/type.h b/src/type.h index d930a88..e4bf078 100644 --- a/src/type.h +++ b/src/type.h @@ -24,6 +24,7 @@ typedef union type type_t; typedef enum { TYPE_UNKNOWN, + TYPE_VOID, TYPE_PRIMITIVE, TYPE_PTR } type_kind_t; @@ -72,6 +73,9 @@ typedef union type type_t * type_new_unknown(arena_t *arena, string_view_t id); +type_t * +type_void(); + type_t * type_new_ptr(arena_t *arena, string_view_t id, type_t *type); #endif diff --git a/tests/olc/0002_binary_operator_addition.ol b/tests/olc/0002_binary_operator_addition.ol index e408b47..c66f2e8 100644 --- a/tests/olc/0002_binary_operator_addition.ol +++ b/tests/olc/0002_binary_operator_addition.ol @@ -19,4 +19,15 @@ fn main(): u32 { } # TEST test_compile(exit_code=0) + # TEST test_run_binary(exit_code=21) + +# TEST test_ast WITH +# Translation_Unit +# `-Function_Definition +# `-Block +# `-Return_Statement +# `-Binary_Operation (+) +# |-Literal +# `-Literal +# END diff --git a/tests/olc/0028_function_call.ol b/tests/olc/0028_function_call.ol index b32fbbf..1bd6ad9 100644 --- a/tests/olc/0028_function_call.ol +++ b/tests/olc/0028_function_call.ol @@ -38,7 +38,7 @@ fn add(a: u32, b: u64): u8 { # |-Param_Definition # `-Block # `-Return_Statement -# `-Binary_Operation (+) +# `-Binary_Operation (+) # |-Reference # `-Reference # END diff --git a/tests/olc/0030_while_statement.ol b/tests/olc/0030_while_statement.ol index 0ce0185..09ba7bd 100644 --- a/tests/olc/0030_while_statement.ol +++ b/tests/olc/0030_while_statement.ol @@ -40,7 +40,7 @@ fn main(): u32 { # | `-Block # | `-Binary_Operation (=) # | |-Reference -# | `-Binary_Operation (+) +# | `-Binary_Operation (+) # | |-Reference # | `-Literal # `-Return_Statement -- 2.46.1