Implement Allow .? operator to unwrap any union #549

This commit is contained in:
gingerBill
2020-05-14 00:00:10 +01:00
parent f6c7a0c9b8
commit af1d4d6e72
2 changed files with 21 additions and 2 deletions
+1 -1
View File
@@ -292,7 +292,7 @@ AST_KIND(_ExprBegin, "", bool) \
AST_KIND(TernaryExpr, "ternary expression", struct { Ast *cond, *x, *y; }) \
AST_KIND(TernaryIfExpr, "ternary if expression", struct { Ast *x, *cond, *y; }) \
AST_KIND(TernaryWhenExpr, "ternary when expression", struct { Ast *x, *cond, *y; }) \
AST_KIND(TypeAssertion, "type assertion", struct { Ast *expr; Token dot; Ast *type; }) \
AST_KIND(TypeAssertion, "type assertion", struct { Ast *expr; Token dot; Ast *type; Type *type_hint; }) \
AST_KIND(TypeCast, "type cast", struct { Token token; Ast *type, *expr; }) \
AST_KIND(AutoCast, "auto_cast", struct { Token token; Ast *expr; }) \
AST_KIND(_ExprEnd, "", bool) \