Closed acidiney closed 5 months ago
Is panic(msg)
valid syntax or deprecated? I see a comment here about the same syntax for todo
being deprecated: https://github.com/gleam-lang/tree-sitter-gleam/blob/2012f294baacf30e7a62414754021284377366c6/grammar.js#L348-L360
It's valid syntax. It's a panic expression being used as a function call. It's clearly incorrect code, but it's syntactically valid.
It's equivalent to this
let x = panic
x("...")
Hey, when utilizing the![image](https://github.com/gleam-lang/tree-sitter-gleam/assets/24493328/59ec8e5d-49b4-4103-9782-fd4b004e44d6)
panic()
function within code files in nvim and hx editors, a syntax highlighting issue occurs as you can see in image below:If I change![image](https://github.com/gleam-lang/tree-sitter-gleam/assets/24493328/ddfd0743-3815-4377-b0ad-adb6b4fb947b)
panic()
topanic as "Error"
everything looks fine:Thanks