hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/sfinae.y
diff options
context:
space:
mode:
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 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