Remove #opaque types

This commit is contained in:
gingerBill
2021-02-23 15:45:06 +00:00
parent 28f279329d
commit 41b854f192
23 changed files with 2 additions and 262 deletions
-5
View File
@@ -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,
-2
View File
@@ -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);
-2
View File
@@ -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 {
-6
View File
@@ -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);