mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove #opaque types
This commit is contained in:
@@ -630,11 +630,6 @@ Distinct_Type :: struct {
|
||||
type: ^Expr,
|
||||
}
|
||||
|
||||
Opaque_Type :: struct {
|
||||
using node: Expr,
|
||||
type: ^Expr,
|
||||
}
|
||||
|
||||
Poly_Type :: struct {
|
||||
using node: Expr,
|
||||
dollar: tokenizer.Pos,
|
||||
|
||||
@@ -243,8 +243,6 @@ clone_node :: proc(node: ^Node) -> ^Node {
|
||||
r.type = clone(r.type);
|
||||
case Distinct_Type:
|
||||
r.type = clone(r.type);
|
||||
case Opaque_Type:
|
||||
r.type = clone(r.type);
|
||||
case Poly_Type:
|
||||
r.type = auto_cast clone(r.type);
|
||||
r.specialization = clone(r.specialization);
|
||||
|
||||
@@ -339,8 +339,6 @@ walk :: proc(v: ^Visitor, node: ^Node) {
|
||||
walk(v, n.type);
|
||||
case Distinct_Type:
|
||||
walk(v, n.type);
|
||||
case Opaque_Type:
|
||||
walk(v, n.type);
|
||||
case Poly_Type:
|
||||
walk(v, n.type);
|
||||
if n.specialization != nil {
|
||||
|
||||
@@ -2101,12 +2101,6 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
|
||||
tok := expect_token(p, .Hash);
|
||||
name := expect_token(p, .Ident);
|
||||
switch name.text {
|
||||
case "opaque":
|
||||
type := parse_type(p);
|
||||
ot := ast.new(ast.Opaque_Type, tok.pos, type.end);
|
||||
ot.type = type;
|
||||
return ot;
|
||||
|
||||
case "type":
|
||||
type := parse_type(p);
|
||||
hp := ast.new(ast.Helper_Type, tok.pos, type.end);
|
||||
|
||||
Reference in New Issue
Block a user