aboutsummaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-01-11 00:52:21 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-01-11 00:52:21 +0200
commit2d8d5ffaee9701955828413f844afa1b3767f748 (patch)
tree0eab7acec6f06b3a4da61a8207dace8524810652 /src/parser.y
parent2d90cea9adb9a3f73cd5b211a4ed9508b505729f (diff)
downloadek-2d8d5ffaee9701955828413f844afa1b3767f748.tar.gz
ek-2d8d5ffaee9701955828413f844afa1b3767f748.zip
futher struct continuation work
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y16
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