diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-30 14:52:42 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-30 14:52:42 +0100 |
| commit | 62a72f0163b2f35ca11cd8f4bbb4c7de2c66fca4 (patch) | |
| tree | e334be658d8ed4018e8ae8bb37334dbc1834f14c /src/parser.cpp | |
| parent | 655931f0ea282f8dbaa769a213311a774e4f84c6 (diff) | |
`transmute(type)x`; Minor code clean up
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index b7209058e..9ef0759ef 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2850,6 +2850,13 @@ AstNode *parse_unary_expr(AstFile *f, bool lhs) { Token close = expect_token(f, Token_CloseParen); return ast_type_cast(f, token, type, parse_unary_expr(f, lhs)); } break; + case Token_transmute: { + Token token = expect_token(f, Token_transmute); + Token open = expect_token_after(f, Token_OpenParen, "transmute"); + AstNode *type = parse_type(f); + Token close = expect_token(f, Token_CloseParen); + return ast_type_cast(f, token, type, parse_unary_expr(f, lhs)); + } break; } AstNode *operand = parse_operand(f, lhs); |