diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-22 12:32:29 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-22 12:32:29 +0100 |
| commit | 86b613fb15843b040b6c41d982eb86aa1c93a346 (patch) | |
| tree | 052cbd0c2ea3a7ce412047b88d33e6fd742bebfb /src/parser.cpp | |
| parent | d09ac8943ac38b955e9a10d22e5c2f3fba8e7eaa (diff) | |
Remove the need for `type_of`, `size_of`, `align_of`, `offset_of` to be keywords
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index c08325c26..664aeb56d 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1731,11 +1731,6 @@ Ast *parse_operand(AstFile *f, bool lhs) { case Token_Rune: return ast_basic_lit(f, advance_token(f)); - case Token_size_of: - case Token_align_of: - case Token_offset_of: - return parse_call_expr(f, ast_implicit(f, advance_token(f))); - case Token_String: return ast_basic_lit(f, advance_token(f)); @@ -2016,17 +2011,6 @@ Ast *parse_operand(AstFile *f, bool lhs) { return ast_typeid_type(f, token, nullptr); } break; - case Token_type_of: { - Ast *i = ast_implicit(f, expect_token(f, Token_type_of)); - Ast *type = parse_call_expr(f, i); - while (f->curr_token.kind == Token_Period) { - Token token = advance_token(f); - Ast *sel = parse_ident(f); - type = ast_selector_expr(f, token, type, sel); - } - return type; - } break; - case Token_Pointer: { Token token = expect_token(f, Token_Pointer); Ast *elem = parse_type(f); |