Ken-Patrick Lehrmann 7ddb7aef7d 8526: Fix ast construction for ternary operator
This tries to decide a bit more properly when ':' can be part of a
ternary operator. More precisely, there are some times when we want to
delay the construction of the ast for ':', so that it is place
accordingly to the matching '?'.

Typically, this fixes an issue with
`return val < 0 ? throw 1 : val;`,
where the ast for ':' would be constructed during as part of the
`throw`, and the ast for `?` would be invalid.

This patch is a bit of a hardcode, stating that we don't expect ':'
inside a throw, unless there is a complete ternary operator in there
(there can't be a range based for loop, a case in a switch). When we
reach ':', we know we are and the end of the `throw`.
2020-06-14 18:57:18 +02:00
..
2020-06-13 16:37:12 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-06-13 16:37:12 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 16:37:12 +02:00
2020-05-25 16:02:34 +02:00