Skip to content

Commit

Permalink
Update tree-sitter-r.wasm and make queries work (#2726)
Browse files Browse the repository at this point in the history
@jennybc generated this tree-sitter-r.wasm with:

* tree-sitter cli v0.21.0. Although the latest tree-sitter is v0.22.2, @DavisVaughan advises that we are effectively pinned at a lower version for the time being.
* `next` branch of https://github.com/r-lib/tree-sitter-r at SHA 11ab554cafa88f3482a2dfd4fb6c93e638a22d0e
  • Loading branch information
jennybc authored Apr 11, 2024
1 parent 5f0a08c commit b76a544
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
Binary file modified extensions/positron-r/resources/testing/tree-sitter-r.wasm
100644 → 100755
Binary file not shown.
34 changes: 14 additions & 20 deletions extensions/positron-r/src/testing/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,43 +93,37 @@ async function findTests(uri: vscode.Uri) {
(call
function: [
(identifier) @_function.name
(namespace_get
function: (identifier) @_function.name
)
] (#eq? @_function.name "test_that")
arguments:
(arguments
value: (string) @label
value: (_)
arguments: (arguments
(argument
value: (string) @label
)
)
) @call
(call
function: [
(identifier) @_superfunction.name
(namespace_get
function: (identifier) @_superfunction.name
)
] (#eq? @_superfunction.name "describe")
arguments:
(arguments
arguments: (arguments
(argument
value: (string) @superlabel
value: (_
(call
)
(argument
value: (braced_expression
body: (call
function: [
(identifier) @_function.name
(namespace_get
function: (identifier) @_function.name
)
] (#eq? @_function.name "it")
arguments:
(arguments
arguments: (arguments
(argument
value: (string) @label
value: (_)
)
)
) @call
)
)
)
) @supercall
`
);
Expand Down

0 comments on commit b76a544

Please sign in to comment.