From 519717e3eb7e739e6e2ab0a9317603cbc7897297 Mon Sep 17 00:00:00 2001 From: serr Date: Sun, 18 May 2025 19:26:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D1=8F=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE?= =?UTF-8?q?=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=BE=D0=B4=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=82=D0=B8=D0=BF?= =?UTF-8?q?=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=BE=D0=BF=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- analyzers/test/test.y | 4 ++-- tests/test_funcs.txt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/analyzers/test/test.y b/analyzers/test/test.y index 1ddcca0..cf8e191 100644 --- a/analyzers/test/test.y +++ b/analyzers/test/test.y @@ -332,8 +332,8 @@ func_call: any_identifier LPAREN math_expr_or_literals_list_or_empty RPAREN arg_declaration: - IDENTIFIER type - { printf("\033[1;35mARG: %s\n\033[0m", $1); } + identifiers_list type + { printf("\033[1;35mARG DECLARATIONS:\n\033[0m"); } ; arg_list: diff --git a/tests/test_funcs.txt b/tests/test_funcs.txt index 0720738..dbdd07a 100644 --- a/tests/test_funcs.txt +++ b/tests/test_funcs.txt @@ -3,13 +3,13 @@ package main; import "fmt"; // анонимные функции -func anon_func() { +func anon_func(a,b,c,d string, a int) { // Присваиваем анонимную функцию переменной - square := func(x int) int { - return x * x; + square := func(x, y int) int { + return x * y; }; - fmt.Println(square(5)); // Выведет: 25 + fmt.Println(square(5, 5)); // Выведет: 25 } // замыкания