mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Remove opaque keyboard
This commit is contained in:
+3
-11
@@ -1908,19 +1908,8 @@ Ast *parse_operand(AstFile *f, bool lhs) {
|
|||||||
return ast_distinct_type(f, token, type);
|
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: {
|
case Token_Hash: {
|
||||||
Token token = expect_token(f, 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);
|
Token name = expect_token(f, Token_Ident);
|
||||||
if (name.string == "type") {
|
if (name.string == "type") {
|
||||||
@@ -1994,6 +1983,9 @@ Ast *parse_operand(AstFile *f, bool lhs) {
|
|||||||
tag = parse_call_expr(f, tag);
|
tag = parse_call_expr(f, tag);
|
||||||
Ast *type = parse_type(f);
|
Ast *type = parse_type(f);
|
||||||
return ast_relative_type(f, tag, type);
|
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 {
|
} else {
|
||||||
operand = ast_tag_expr(f, token, name, parse_expr(f, false));
|
operand = ast_tag_expr(f, token, name, parse_expr(f, false));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ TOKEN_KIND(Token__KeywordBegin, ""), \
|
|||||||
TOKEN_KIND(Token_cast, "cast"), \
|
TOKEN_KIND(Token_cast, "cast"), \
|
||||||
TOKEN_KIND(Token_transmute, "transmute"), \
|
TOKEN_KIND(Token_transmute, "transmute"), \
|
||||||
TOKEN_KIND(Token_distinct, "distinct"), \
|
TOKEN_KIND(Token_distinct, "distinct"), \
|
||||||
TOKEN_KIND(Token_opaque, "opaque"), \
|
|
||||||
TOKEN_KIND(Token_using, "using"), \
|
TOKEN_KIND(Token_using, "using"), \
|
||||||
TOKEN_KIND(Token_inline, "inline"), \
|
TOKEN_KIND(Token_inline, "inline"), \
|
||||||
TOKEN_KIND(Token_no_inline, "no_inline"), \
|
TOKEN_KIND(Token_no_inline, "no_inline"), \
|
||||||
|
|||||||
Reference in New Issue
Block a user