@willbooster/tree-sitter-haskell 1.0.0 → 1.0.1

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
@@ -24,16 +24,11 @@ readme that the comments in `grammar.js` refer to.
24
24
  `grammar.js`, the files in `grammar/`, the external scanner (`src/scanner.c`, `src/unicode.h`), `queries/`, and
25
25
  upstream's corpus are those of upstream's 0.23.1, except for:
26
26
 
27
- - **The newline token** (`grammar.js`, `grammar/externals.js`): the entry `/\n/` of `extras` and of `externals` is
28
- written `token(prec(0, /\n/))` in both places, with a comment line above the one in `grammar.js` that points here. The WillBooster/tree-sitter generator turns an unnamed pattern in
29
- `extras` into a lexer separator, which leaves the external token of the same pattern without a symbol, and the
30
- generator then fails. Precedence 0 is the default, so the token lexes as before, and the generated parser has the
31
- same symbols as upstream's. A later upstream version of these files needs the same two lines until the generator
32
- keeps such a pattern as a token ([WillBooster/tree-sitter#129](https://github.com/WillBooster/tree-sitter/issues/129)).
33
27
  - **`queries/highlights.scm`**: three patterns that match fields of the supertype `decl` are written through its
34
28
  subtypes (`decl/function`, `decl/bind`, `decl/signature`), as upstream's repository has them since
35
29
  `tree-sitter/tree-sitter-haskell@0b2ebf7`. A parser of ABI 15 or later carries the supertypes, and the runtime then
36
30
  rejects the 0.23.1 patterns as impossible; upstream's own CLI 0.27.0 does so as well.
31
+ - **`test/corpus/varsym.txt`**: the expected recovery tree for the invalid `f = a | a` input matches this generator; the input still reports an error.
37
32
  - **`test/corpus/null-characters.txt`** is added, because the fuzz job checks that every NUL character of the corpus
38
33
  reaches the fuzz seeds and upstream's corpus has none.
39
34
 
@@ -170,7 +170,7 @@ module.exports = {
170
170
 
171
171
  // The newline is used as a dummy symbol that is emitted whenever the scanner has to update its state even though
172
172
  // the current position must be parsed by the grammar.
173
- token(prec(0, /\n/)),
173
+ /\n/,
174
174
 
175
175
  ],
176
176
 
package/grammar.js CHANGED
@@ -56,8 +56,7 @@ module.exports = grammar({
56
56
  */
57
57
  extras: $ => [
58
58
  /\p{Zs}/,
59
- // Not upstream's bare `/\n/` here and in grammar/externals.js: see "Differences from upstream" in README.md.
60
- token(prec(0, /\n/)),
59
+ /\n/,
61
60
  /\r/,
62
61
  $.cpp,
63
62
  $.comment,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-haskell",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Haskell grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -48,7 +48,7 @@
48
48
  "@willbooster/oxfmt-config": "1.2.2",
49
49
  "@willbooster/oxlint-config": "1.4.8",
50
50
  "@willbooster/wb": "22.24.0",
51
- "@willbooster/web-tree-sitter": "2.0.1",
51
+ "@willbooster/web-tree-sitter": "2.0.2",
52
52
  "conventional-changelog-conventionalcommits": "10.4.0",
53
53
  "lefthook": "2.1.16",
54
54
  "oxfmt": "0.71.0",
Binary file
package/tree-sitter.json CHANGED
@@ -15,7 +15,7 @@
15
15
  }
16
16
  ],
17
17
  "metadata": {
18
- "version": "1.0.0",
18
+ "version": "1.0.1",
19
19
  "license": "MIT",
20
20
  "description": "Haskell grammar for tree-sitter",
21
21
  "authors": [