aboutsummaryrefslogtreecommitdiff
path: root/src/parser.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-05-05 15:22:54 +0100
committergingerBill <bill@gingerbill.org>2021-05-05 15:22:54 +0100
commit278de3a92f80e1c3f1abc3ece53db6d0bba1e393 (patch)
tree7ac454d13dd24705b25997c71a78457858cb4166 /src/parser.hpp
parentabdf54800ec282934d7b0730d13a77b46c5c663b (diff)
Unify `AstTernaryExpr` with `AstTernaryIfExpr`
Allow for both syntaxes `x if cond else y` and `cond ? x : y` Removes the confusing semantics behind `?:` which could be `if` or `when` depending on the context.
Diffstat (limited to 'src/parser.hpp')
-rw-r--r--src/parser.hpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/parser.hpp b/src/parser.hpp
index 93c0363ab..2a0b0fa27 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -343,7 +343,6 @@ AST_KIND(_ExprBegin, "", bool) \
i32 builtin_id; \
}) \
AST_KIND(FieldValue, "field value", struct { Token eq; Ast *field, *value; }) \
- 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; Type *type_hint; }) \