Skip to content

Commit

Permalink
update Gleam grammar and queries
Browse files Browse the repository at this point in the history
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also gleam-lang/tree-sitter-gleam#14 (comment)
  • Loading branch information
the-mikedavis committed May 23, 2022
1 parent 29121a1 commit c4639d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ indent = { tab-width = 2, unit = " " }

[[grammar]]
name = "gleam"
source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "7159ce961592192b0e7cdf88782cda0fdf41a4cb" }
source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "17ed183fc836deac6398ffe29e6e86f8bbb7c3ba" }

[[language]]
name = "ron"
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/gleam/locals.scm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; Scopes
(function_body) @local.scope
(function) @local.scope

(case_clause) @local.scope

Expand Down

0 comments on commit c4639d7

Please sign in to comment.