From 6487b5b5301f6cb37c95c3571578d5a42adb2a1a Mon Sep 17 00:00:00 2001 From: hachem Date: Sat, 19 Sep 2026 20:50:28 +0200 Subject: feat: declval --- sfinae.y | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sfinae.y') diff --git a/sfinae.y b/sfinae.y index 4e366a8..14eb5f8 100644 --- a/sfinae.y +++ b/sfinae.y @@ -33,6 +33,7 @@ void yyerror(const char* message); %token TOK_SEQUENCE %token TOK_NAME %token TOK_VALUE_OF +%token TOK_DECLVAL %token TOK_VOID %token TOK_INT32 %token TOK_BYTE @@ -197,6 +198,8 @@ value { $$ = node_binary(VALUE_QUOTIENT, $4, $6); } | TOK_COLONCOLON TOK_VALUE_OF '<' name '>' { $$ = node_named(VALUE_VARIABLE, &$4, NULL); } + | TOK_COLONCOLON TOK_DECLVAL '<' type '>' '(' ')' + { $$ = node_unary(VALUE_DECLVAL, $4); } | TOK_COLONCOLON TOK_EXTENT '<' type '>' TOK_COLONCOLON TOK_VALUE { $$ = node_unary(VALUE_EXTENT, $4); } | TOK_COLONCOLON TOK_TUPLE_SIZE '<' type '>' TOK_COLONCOLON TOK_VALUE -- cgit v1.3