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-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:16:49 +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-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-06-13 16:37:12 +02:00
2020-06-13 16:37:12 +02:00
2020-06-01 08:59:34 +02:00
2020-05-23 07:16:49 +02:00
2020-06-13 16:37:12 +02:00
2020-06-13 16:37:12 +02:00
2020-06-08 00:50:45 +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-23 07:16:49 +02:00
2020-05-23 07:16:49 +02:00
2020-06-13 16:37:12 +02:00
2020-05-23 07:16:49 +02:00
2020-05-23 07:30:22 +02:00
2020-05-23 07:16:49 +02:00
2020-05-27 21:31:40 +02:00
2020-06-14 10:06:54 +02:00
2020-05-31 21:37:02 +02:00
2020-05-23 07:16:49 +02:00
2020-06-12 16:08:40 +02:00
2020-05-23 07:16:49 +02:00
2019-09-25 15:25:19 +02:00
2020-05-23 07:16:49 +02:00
2020-05-10 11:16:32 +02:00
2019-12-21 11:23:01 +01:00
2019-09-25 15:25:19 +02:00
2020-05-10 11:16:32 +02:00
2020-05-10 11:16:32 +02:00
2020-06-13 07:45:31 +02:00
2020-05-10 11:16:32 +02:00
2020-06-14 07:16:14 +02:00