From 7160bdb390ef1c9bdcfb0c075b33be39d62860f3 Mon Sep 17 00:00:00 2001 From: hachem Date: Sat, 19 Sep 2026 13:54:59 +0200 Subject: feat: static_assert --- sfinae.y | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sfinae.y') diff --git a/sfinae.y b/sfinae.y index ca3121d..0d7f0ee 100644 --- a/sfinae.y +++ b/sfinae.y @@ -17,6 +17,7 @@ void yyerror(const char* message); %token TOK_COLONCOLON %token TOK_EMIT +%token TOK_STATIC_ASSERT %token TOK_COMMIT %token TOK_VOID %token TOK_INT32 @@ -61,6 +62,8 @@ statements statement : TOK_COLONCOLON TOK_EMIT '<' type '>' TOK_COLONCOLON TOK_COMMIT { $$ = node_unary(STMT_EMIT, $4); } + | TOK_COLONCOLON TOK_STATIC_ASSERT '<' condition '>' TOK_COLONCOLON TOK_COMMIT + { $$ = node_unary(STMT_STATIC_ASSERT, $4); } ; type -- cgit v1.3