tree-sitter-batch 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -100,6 +100,17 @@ pip install tree-sitter-batch
100
100
  import tree_sitter_batch "github.com/wharflab/tree-sitter-batch/bindings/go"
101
101
  ```
102
102
 
103
+ The root package also exports the bundled `queries/highlights.scm` via `go:embed`:
104
+
105
+ ```go
106
+ import batch "github.com/wharflab/tree-sitter-batch"
107
+
108
+ lang := batch.GetLanguage()
109
+ query, _ := batch.GetHighlightsQuery()
110
+ // or access the raw .scm source:
111
+ // raw := batch.HighlightsQuery
112
+ ```
113
+
103
114
  ## Usage
104
115
 
105
116
  ### Node.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tree-sitter-batch",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "A Windows Batch/CMD grammar for tree-sitter",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,6 +29,10 @@
29
29
  ; Commands
30
30
  (command_name) @function
31
31
 
32
+ ; CMD pseudo/dynamic environment variables
33
+ ((variable_reference) @variable.builtin
34
+ (#match? @variable.builtin "(?i)^[%!](CD|ERRORLEVEL|DATE|TIME|RANDOM|CMDCMDLINE|CMDEXTVERSION|HIGHESTNUMANODENUMBER|__APPDIR__|__CD__)[%!]$"))
35
+
32
36
  ; Variables
33
37
  (variable_reference) @variable
34
38
 
Binary file
package/tree-sitter.json CHANGED
@@ -17,7 +17,7 @@
17
17
  }
18
18
  ],
19
19
  "metadata": {
20
- "version": "0.4.2",
20
+ "version": "0.5.0",
21
21
  "license": "MIT",
22
22
  "description": "A Windows Batch/CMD grammar for tree-sitter",
23
23
  "authors": [