DanielGavin / ols

Language server for Odin
MIT License
479 stars 71 forks source link

Add grammar for ternary exp and union member access #513

Closed thetarnav closed 1 month ago

thetarnav commented 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 [?]