tree-sitter-zsh 0.48.0 → 0.50.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/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "tree-sitter-zsh",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
4
4
  "description": "Zsh grammar for tree-sitter",
5
- "repository": "https://github.com/geohar/tree-sitter-zsh",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/georgeharker/tree-sitter-zsh.git"
8
+ },
6
9
  "license": "MIT",
7
10
  "author": {
8
11
  "name": "George Harrison",
@@ -50,5 +53,8 @@
50
53
  "prestart": "tree-sitter build --wasm",
51
54
  "start": "tree-sitter playground",
52
55
  "test": "node --test bindings/node/*_test.js"
56
+ },
57
+ "publishConfig": {
58
+ "provenance": true
53
59
  }
54
60
  }
package/src/parser.c CHANGED
@@ -1174403,7 +1174403,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_zsh(void) {
1174403
1174403
  .max_reserved_word_set_size = 0,
1174404
1174404
  .metadata = {
1174405
1174405
  .major_version = 0,
1174406
- .minor_version = 48,
1174406
+ .minor_version = 50,
1174407
1174407
  .patch_version = 0,
1174408
1174408
  },
1174409
1174409
  };
package/src/scanner.c CHANGED
@@ -986,13 +986,15 @@ static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) {
986
986
  fprintf(stderr, "SCANNER: Found $ character\n");
987
987
  #endif
988
988
  advance(lexer);
989
- // Spwcial case for ${$} which must be handled with care
989
+ // Special case for ${$} which must be handled with care
990
+ // The / case is for parameter expansion patterns like ${var/pattern/replacement}
991
+ // but should only apply inside parameter expansion context
990
992
  if (valid_symbols[RAW_DOLLAR] && (
991
993
  lexer->lookahead == ':' ||
992
994
  lexer->lookahead == '?' ||
993
995
  lexer->lookahead == '%' ||
994
996
  lexer->lookahead == '#' ||
995
- lexer->lookahead == '/' ||
997
+ (lexer->lookahead == '/' && in_parameter_expansion(scanner)) ||
996
998
  lexer->lookahead == '+' ||
997
999
  lexer->lookahead == '-' ||
998
1000
  lexer->lookahead == '}' ||
package/tree-sitter.json CHANGED
@@ -18,7 +18,7 @@
18
18
  }
19
19
  ],
20
20
  "metadata": {
21
- "version": "0.48.0",
21
+ "version": "0.50.0",
22
22
  "license": "MIT",
23
23
  "description": "Zsh grammar for tree-sitter",
24
24
  "authors": [