Open turbo opened 2 years ago
Thanks for reporting!
Could you help me isolate the scenario? I remember fixing this case, and I cannot reproduce it here.
Example:
(let [(x y z) (unpack [10 9 8])]
(+ x y z))
Works fine:
We have these tests to validate that scenario: syntax_test_fennel_reference.fnl#L250 and syntax_test_fennel_reference.fnl#L513
I suspect it may be an edge case with nested expressions or something like that.
Here's the smallest valid case I can produce:
(let [x y
(_ _ a b) c])
Here's a smaller example that still exhibits the behavior, but is invalid syntax - may help debug:
(let [x
(_ _)])
Oh, I got it. It happens from the second pair onwards:
(let [(a b) [1 2] (c d) [3 4]])
The c
should not be highlighted as a function call.
A pick expression should highlight the same in
(local (_ a b) (fn))
and(let [(_ a b) (fn)] ...)
, but in let, the first item is treated as a function by the highlighter: