Closed lpil closed 1 year ago
I think tree-sitter parsers shouldn't be so restrictive that they are basically linters but on the other hand it's a nice experience when your syntax highlighting hints that your program will not compile. So I think we should stay close to the upstream parser here and restrict this syntax 👍
Agreed
Hello there!
Gleam's parser has been changed to only permit
let
anduse
directly within functions and block. Code such as this will now be rejected:This is a subset of the previously accepted syntax so the current tree sitter will still parse all valid programs, but perhaps perhaps it wants to be restricted also?