diff options
Diffstat (limited to 'sfinae.y')
| -rw-r--r-- | sfinae.y | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -18,6 +18,11 @@ void yyerror(const char* message); %token TOK_COLONCOLON %token TOK_EMIT %token TOK_COMMIT +%token TOK_VOID +%token TOK_INT32 +%token TOK_BYTE +%token TOK_SIZE_T +%token TOK_REMOVE_CV %token TOK_DECLTYPE %token TOK_DIFFERENCE %token TOK_SUM @@ -47,7 +52,17 @@ statement ; type - : TOK_COLONCOLON TOK_DECLTYPE '(' value ')' + : TOK_COLONCOLON TOK_VOID + { $$ = node_leaf(TYPE_VOID); } + | TOK_COLONCOLON TOK_INT32 + { $$ = node_leaf(TYPE_INT32); } + | TOK_COLONCOLON TOK_BYTE + { $$ = node_leaf(TYPE_BYTE); } + | TOK_COLONCOLON TOK_SIZE_T + { $$ = node_leaf(TYPE_SIZE); } + | TOK_COLONCOLON TOK_REMOVE_CV '<' type '>' + { $$ = node_unary(TYPE_REMOVE_CV, $4); } + | TOK_COLONCOLON TOK_DECLTYPE '(' value ')' { $$ = node_unary(TYPE_DECLTYPE, $4); } ; |
