diff options
| author | gingerBill <bill@gingerbill.org> | 2021-02-23 13:02:18 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-02-23 13:02:18 +0000 |
| commit | a652c24ac3c8e592d413b3d3123e750fcaf314db (patch) | |
| tree | fb4e9b289c616294b16255aec20770747c90f95d /src/parser.cpp | |
| parent | 595885d3db29bd3d611427877a52e574fe878a9e (diff) | |
Remove `opaque` keyboard
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 2f59d736c..4039c5dbe 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1908,19 +1908,8 @@ Ast *parse_operand(AstFile *f, bool lhs) { return ast_distinct_type(f, token, type); } - case Token_opaque: { - Token token = expect_token(f, Token_opaque); - warning(token, "opaque is deprecated, please use #opaque"); - Ast *type = parse_type(f); - return ast_opaque_type(f, token, type); - } - case Token_Hash: { Token token = expect_token(f, Token_Hash); - if (allow_token(f, Token_opaque)) { - Ast *type = parse_type(f); - return ast_opaque_type(f, token, type); - } Token name = expect_token(f, Token_Ident); if (name.string == "type") { @@ -1994,6 +1983,9 @@ Ast *parse_operand(AstFile *f, bool lhs) { tag = parse_call_expr(f, tag); Ast *type = parse_type(f); return ast_relative_type(f, tag, type); + } else if (name.string == "opaque") { + Ast *type = parse_type(f); + return ast_opaque_type(f, token, type); } else { operand = ast_tag_expr(f, token, name, parse_expr(f, false)); } |