hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/sfinae.y
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-19 15:51:57 +0200
committerhachem <im@hachem.wtf>2026-09-19 15:51:57 +0200
commitbe43ea893018090044cd411bc5b50787b99087b8 (patch)
tree379af1300ee53afa0a7029835257f254aaccfce2 /sfinae.y
parent6d8b0392bb0c0df82285eec1b0f692113e66eb1a (diff)
feat: add reapts and loops
Diffstat (limited to 'sfinae.y')
-rw-r--r--sfinae.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/sfinae.y b/sfinae.y
index f97147f..341be36 100644
--- a/sfinae.y
+++ b/sfinae.y
@@ -24,6 +24,7 @@ void yyerror(const char* message);
%token TOK_DECLARE
%token TOK_UNDECLARE
%token TOK_ENABLE_IF
+%token TOK_REPEAT
%token TOK_SEQUENCE
%token TOK_NAME
%token TOK_VALUE_OF
@@ -79,6 +80,8 @@ statement
{ $$ = node_named(STMT_UNDECLARE, &$4, NULL); }
| TOK_COLONCOLON TOK_ENABLE_IF '<' condition ',' sequence '>' TOK_COLONCOLON TOK_COMMIT
{ $$ = node_block(STMT_ENABLE_IF, $4, $6); }
+ | TOK_COLONCOLON TOK_REPEAT '<' value ',' sequence '>' TOK_COLONCOLON TOK_COMMIT
+ { $$ = node_block(STMT_REPEAT, $4, $6); }
;
// the statements inside are committed one by one, without the semicolons