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 } // замыкания