x if cond else y and x when cond else y expressions

This commit is contained in:
gingerBill
2020-03-05 20:34:30 +00:00
parent 2fe0eaf2ad
commit e92fdb4a99
20 changed files with 336 additions and 44 deletions
+18
View File
@@ -200,6 +200,24 @@ Ternary_Expr :: struct {
y: ^Expr,
}
Ternary_If_Expr :: struct {
using node: Expr,
x: ^Expr,
op1: tokenizer.Token,
cond: ^Expr,
op2: tokenizer.Token,
y: ^Expr,
}
Ternary_When_Expr :: struct {
using node: Expr,
x: ^Expr,
op1: tokenizer.Token,
cond: ^Expr,
op2: tokenizer.Token,
y: ^Expr,
}
Type_Assertion :: struct {
using node: Expr,
expr: ^Expr,