diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-11 00:52:21 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-11 00:52:21 +0200 |
| commit | 2d8d5ffaee9701955828413f844afa1b3767f748 (patch) | |
| tree | 0eab7acec6f06b3a4da61a8207dace8524810652 /src/parser.y | |
| parent | 2d90cea9adb9a3f73cd5b211a4ed9508b505729f (diff) | |
| download | ek-2d8d5ffaee9701955828413f844afa1b3767f748.tar.gz ek-2d8d5ffaee9701955828413f844afa1b3767f748.zip | |
futher struct continuation work
Diffstat (limited to 'src/parser.y')
| -rw-r--r-- | src/parser.y | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/parser.y b/src/parser.y index c7a3a63..3808807 100644 --- a/src/parser.y +++ b/src/parser.y @@ -75,7 +75,6 @@ %token RSHIFTSELF ">>=" %token COMMA "," %token PUB "pub" -%token STRUCT "struct" %token UNION "union" %token TYPEDEF "typedef" %token IMPORT "import" @@ -778,22 +777,13 @@ struct } struct_cont - : "continue" "[" opt_type_params "]" - APPLY "[" opt_types "]" "{" opt_behaviours "}" { - /* full form */ - $$ = gen_struct_cont($5, $3, $7, $10, src_loc(@$)); - } - | "continue" "[" opt_type_params "]" ID "{" opt_behaviours "}" { - /* abbrev 1 */ - $$ = gen_struct_cont($5, $3, NULL, $7, src_loc(@$)); - } - | "continue" APPLY "[" opt_types "]" "{" opt_behaviours "}" { + : "continue" ID "[" opt_type_params "]" "{" opt_behaviours "}" { /* abbrev 2 */ - $$ = gen_struct_cont($2, NULL, $4, $7, src_loc(@$)); + $$ = gen_struct_cont($2, $4, $7, src_loc(@$)); } | "continue" ID "{" opt_behaviours "}" { /* abbrev 3 */ - $$ = gen_struct_cont($2, NULL, NULL, $4, src_loc(@$)); + $$ = gen_struct_cont($2, NULL, $4, src_loc(@$)); } alias |
