diff options
| author | hachem <im@hachem.wtf> | 2026-09-19 11:52:25 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-19 11:52:25 +0200 |
| commit | b20c46c555986a99be70de61d91bc225e53f31d2 (patch) | |
| tree | 7c3b94ca7cd894e0597bcef65f5f19ea9f1e7ecd /sfinae.y | |
| parent | dd52ccd9319aa847cddc486519075b806c9e9092 (diff) | |
eval: sum product and quotient
Diffstat (limited to 'sfinae.y')
| -rw-r--r-- | sfinae.y | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -20,6 +20,9 @@ void yyerror(const char* message); %token TOK_COMMIT %token TOK_DECLTYPE %token TOK_DIFFERENCE +%token TOK_SUM +%token TOK_PRODUCT +%token TOK_QUOTIENT %token <character> TOK_CHAR %type <node> statements statement type value @@ -51,6 +54,12 @@ type value : TOK_COLONCOLON TOK_DIFFERENCE '<' TOK_CHAR ',' TOK_CHAR '>' { $$ = node_binary(VALUE_DIFFERENCE, node_char($4), node_char($6)); } + | TOK_COLONCOLON TOK_SUM '<' value ',' value '>' + { $$ = node_binary(VALUE_SUM, $4, $6); } + | TOK_COLONCOLON TOK_PRODUCT '<' value ',' value '>' + { $$ = node_binary(VALUE_PRODUCT, $4, $6); } + | TOK_COLONCOLON TOK_QUOTIENT '<' value ',' value '>' + { $$ = node_binary(VALUE_QUOTIENT, $4, $6); } ; %% |
