Closed thetarnav closed 1 month ago
Fixes #512
The issue was caused by the : char which is used to trigger a type-annotation expression, but is also used in other syntaxes.
:
This adds grammar for ternaries (a ? b : c), union member accesses (a.? and a.(b)), slicing [:] and inferring the array length [?]
a ? b : c
a.?
a.(b)
[:]
[?]
Fixes #512
The issue was caused by the
:
char which is used to trigger a type-annotation expression, but is also used in other syntaxes.This adds grammar for ternaries (
a ? b : c
), union member accesses (a.?
anda.(b)
), slicing[:]
and inferring the array length[?]