diff --git a/analyzers/test/test.y b/analyzers/test/test.y index c36c4cf..487cef0 100644 --- a/analyzers/test/test.y +++ b/analyzers/test/test.y @@ -419,7 +419,9 @@ func_declaration: // struct declarate_field_list: | arg_declaration + | IDENTIFIER | declarate_field_list SEMICOLON arg_declaration + | declarate_field_list SEMICOLON IDENTIFIER ; field: diff --git a/tests/test_types.txt b/tests/test_types.txt index d67bb5d..dc4c93f 100644 --- a/tests/test_types.txt +++ b/tests/test_types.txt @@ -8,6 +8,7 @@ import ( type mile uint; type BinaryOp func(int, int) int; +type text []string; type empty struct{ }; @@ -18,7 +19,8 @@ type person struct{ }; type person2 struct{ name,second_name string; - age int + age int; + person };