Closed acidiney closed 8 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
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
panic()
topanic as "Error"
everything looks fine:Thanks