@backbencher/brain 0.0.0-stage → 0.1.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.
Files changed (319) hide show
  1. package/CHANGELOG.md +298 -0
  2. package/EMBEDDINGS.md +355 -0
  3. package/LICENSE +21 -0
  4. package/README.md +415 -2
  5. package/bin/bb +13 -0
  6. package/dist/analysis-exclusions-7ZJDXOVZ.js +35 -0
  7. package/dist/brain-index-health-Q5APTJQL.js +17 -0
  8. package/dist/brain-relationship-enrichment-MYR2AM4F.js +558 -0
  9. package/dist/brain.sql-EIM4WS4D.js +29 -0
  10. package/dist/chunk-22V37YTK.js +1758 -0
  11. package/dist/chunk-2BSKD7O3.js +40 -0
  12. package/dist/chunk-2DE27DVC.js +1314 -0
  13. package/dist/chunk-2RRBMNBQ.js +322 -0
  14. package/dist/chunk-2WXYNLBA.js +29 -0
  15. package/dist/chunk-3CTFIJJB.js +17 -0
  16. package/dist/chunk-3ZTOHHSW.js +2104 -0
  17. package/dist/chunk-4H22TLOT.js +543 -0
  18. package/dist/chunk-5BVAH26D.js +340 -0
  19. package/dist/chunk-62DHLYW6.js +3427 -0
  20. package/dist/chunk-7AN7U5IZ.js +371 -0
  21. package/dist/chunk-7DRPNVIN.js +782 -0
  22. package/dist/chunk-7MBYT777.js +174 -0
  23. package/dist/chunk-AHDWGM7Q.js +236 -0
  24. package/dist/chunk-B5GEAAYF.js +818 -0
  25. package/dist/chunk-BEIZZ73B.js +1479 -0
  26. package/dist/chunk-BQ3OVQ3P.js +125 -0
  27. package/dist/chunk-D2Q4Y47A.js +53 -0
  28. package/dist/chunk-DIYAGQJL.js +34 -0
  29. package/dist/chunk-DWKXZ6IF.js +336 -0
  30. package/dist/chunk-DYM4FQEE.js +90 -0
  31. package/dist/chunk-ENW4BTBA.js +930 -0
  32. package/dist/chunk-EWMWK7WN.js +75 -0
  33. package/dist/chunk-EY5ZZUUA.js +626 -0
  34. package/dist/chunk-GBI7V7KY.js +69 -0
  35. package/dist/chunk-GEFFO6O2.js +152 -0
  36. package/dist/chunk-HJEWO5EV.js +247 -0
  37. package/dist/chunk-HQSPJDHI.js +613 -0
  38. package/dist/chunk-KAET47ZL.js +125 -0
  39. package/dist/chunk-KCDECRJY.js +440 -0
  40. package/dist/chunk-L5TDYKYK.js +76 -0
  41. package/dist/chunk-MLKGABMK.js +9 -0
  42. package/dist/chunk-NO3U3FJQ.js +201 -0
  43. package/dist/chunk-OWISBAOF.js +61 -0
  44. package/dist/chunk-QKTRECYS.js +1119 -0
  45. package/dist/chunk-QLK6ED4Q.js +235 -0
  46. package/dist/chunk-R2GW4F6R.js +19 -0
  47. package/dist/chunk-RCMTFSEF.js +87 -0
  48. package/dist/chunk-RM3PY6TG.js +376 -0
  49. package/dist/chunk-ROMM6KMC.js +433 -0
  50. package/dist/chunk-SGGCSHAX.js +12050 -0
  51. package/dist/chunk-SK6YVHFZ.js +211 -0
  52. package/dist/chunk-SM7RFQRO.js +214 -0
  53. package/dist/chunk-UGR4QIGS.js +67 -0
  54. package/dist/chunk-UQNQZXHY.js +711 -0
  55. package/dist/chunk-UUNHHX4M.js +13 -0
  56. package/dist/chunk-VL52PL2T.js +71 -0
  57. package/dist/chunk-WIG36E67.js +196 -0
  58. package/dist/chunk-XHK3WWGB.js +7436 -0
  59. package/dist/chunk-XTQM2IP3.js +2863 -0
  60. package/dist/chunk-ZE2LG76D.js +1296 -0
  61. package/dist/chunk-ZETTGPAW.js +6950 -0
  62. package/dist/cli/index.js +37 -0
  63. package/dist/config-HZAAYDP3.js +10 -0
  64. package/dist/content-search-7XIP555Q.js +593 -0
  65. package/dist/database-76RP44JG.js +9 -0
  66. package/dist/doctor-ANGETYMN.js +395 -0
  67. package/dist/edit-engine-CG72LDZD.js +51 -0
  68. package/dist/engine-BKEOGN7N.js +11 -0
  69. package/dist/engine-VIW6NSKO.js +18 -0
  70. package/dist/fingerprint-OBLIMZLP.js +33 -0
  71. package/dist/framework-intelligence-3LORTPOX.js +860 -0
  72. package/dist/freshness-3K6VU5OT.js +174 -0
  73. package/dist/graph-engine-HBSQNPTB.js +21 -0
  74. package/dist/graph_request-Q6NKB6N2.js +350 -0
  75. package/dist/impact_request-LYP672WE.js +68 -0
  76. package/dist/index-space-IUUN5WYV.js +15 -0
  77. package/dist/index-status-7OVGYSGW.js +34 -0
  78. package/dist/index.js +159 -0
  79. package/dist/instance-FO6QZRLH.js +19 -0
  80. package/dist/language-detection-DFCAU5DZ.js +11 -0
  81. package/dist/lsp/server.js +4301 -0
  82. package/dist/mcp/server.js +132 -0
  83. package/dist/onboard-DIQZV2NW.js +161 -0
  84. package/dist/override-companion-pass-XR7MHTP7.js +117 -0
  85. package/dist/parallel-indexer-FK2XKZXY.js +88 -0
  86. package/dist/pool-worker.js +1153 -0
  87. package/dist/project-health-6XPENVAA.js +94 -0
  88. package/dist/project-index-5SDPHITE.js +57 -0
  89. package/dist/project-registry-ZJ3DVUGO.js +355 -0
  90. package/dist/real-bash-analyzer-EJAU5LW5.js +2201 -0
  91. package/dist/real-c-analyzer-HBD3FNNH.js +5942 -0
  92. package/dist/real-clean-analyzer-4EEZLPV5.js +3470 -0
  93. package/dist/real-clojure-analyzer-Q55EBOO2.js +2818 -0
  94. package/dist/real-cpp-analyzer-IVVOD25R.js +4101 -0
  95. package/dist/real-csharp-analyzer-ZBNLNJZJ.js +3298 -0
  96. package/dist/real-css-analyzer-6XRQLUN7.js +15 -0
  97. package/dist/real-dart-analyzer-OLR72EFW.js +3944 -0
  98. package/dist/real-elixir-analyzer-MQWGAH2I.js +2192 -0
  99. package/dist/real-erlang-analyzer-7BVPQEHO.js +1731 -0
  100. package/dist/real-fsharp-analyzer-C2UPFNOA.js +2390 -0
  101. package/dist/real-go-analyzer-UKGI43YS.js +4126 -0
  102. package/dist/real-graphql-analyzer-VE2EEFII.js +1442 -0
  103. package/dist/real-groovy-analyzer-W26VACFW.js +2285 -0
  104. package/dist/real-haskell-analyzer-5CVVAJRX.js +2533 -0
  105. package/dist/real-hcl-analyzer-5ZT4U43N.js +725 -0
  106. package/dist/real-html-analyzer-JWNX3C6I.js +1759 -0
  107. package/dist/real-java-analyzer-GU42VBGQ.js +4677 -0
  108. package/dist/real-javascript-analyzer-QA4QOJ6W.js +14 -0
  109. package/dist/real-json-analyzer-MPA6PRXL.js +1640 -0
  110. package/dist/real-julia-analyzer-22CWYQMN.js +2085 -0
  111. package/dist/real-kotlin-analyzer-QDZJLXXU.js +3956 -0
  112. package/dist/real-lua-analyzer-G7NHLYKS.js +1957 -0
  113. package/dist/real-makefile-analyzer-OCY3GT5N.js +920 -0
  114. package/dist/real-markdown-analyzer-TEJK2JXJ.js +1215 -0
  115. package/dist/real-matlab-analyzer-Q5SWLN7Z.js +480 -0
  116. package/dist/real-nim-analyzer-YLXSK563.js +3603 -0
  117. package/dist/real-objective-c-analyzer-D23ACC2R.js +1518 -0
  118. package/dist/real-perl-analyzer-WWTRHYDT.js +1865 -0
  119. package/dist/real-php-analyzer-JNKJHTCL.js +9368 -0
  120. package/dist/real-powershell-analyzer-XRSNQERV.js +2915 -0
  121. package/dist/real-protobuf-analyzer-3OKUCZ7T.js +867 -0
  122. package/dist/real-python-analyzer-VXAFWI72.js +4880 -0
  123. package/dist/real-r-analyzer-ZGAIDVI4.js +2596 -0
  124. package/dist/real-ruby-analyzer-X2KTLVBH.js +2429 -0
  125. package/dist/real-rust-analyzer-OFFHPL2A.js +3359 -0
  126. package/dist/real-scala-analyzer-TSTW27J6.js +3293 -0
  127. package/dist/real-scss-analyzer-AVWYPSOQ.js +1515 -0
  128. package/dist/real-solidity-analyzer-UCI2KWUB.js +2608 -0
  129. package/dist/real-sql-analyzer-F77ZMQXR.js +3840 -0
  130. package/dist/real-svelte-analyzer-SF7NRUO5.js +2532 -0
  131. package/dist/real-swift-analyzer-MN5QT3QN.js +2311 -0
  132. package/dist/real-toml-analyzer-66L7BDCQ.js +929 -0
  133. package/dist/real-typescript-analyzer-6KEMVDWQ.js +14 -0
  134. package/dist/real-vb-analyzer-VICVPOP7.js +3145 -0
  135. package/dist/real-vba-analyzer-HXLTTHKM.js +466 -0
  136. package/dist/real-vue-analyzer-QXR56CFV.js +2680 -0
  137. package/dist/real-xml-analyzer-YL465ZJW.js +2405 -0
  138. package/dist/real-yaml-analyzer-SUBCBNSI.js +3528 -0
  139. package/dist/real-zig-analyzer-HIQLZMGY.js +2430 -0
  140. package/dist/regex-search-NJKHMZNO.js +239 -0
  141. package/dist/rules-ACHPB7QU.js +152 -0
  142. package/dist/scoped-path-MJYWJZQX.js +11 -0
  143. package/dist/setup-show-NT5ZHYNE.js +15 -0
  144. package/dist/setup-wizard-G5YYR5T6.js +24 -0
  145. package/dist/symbol-search-GZJIM2J2.js +16 -0
  146. package/dist/taint-KXUHHPIE.js +202 -0
  147. package/dist/taint-analyzer-N7YLZU3N.js +163 -0
  148. package/dist/tool-handlers-OJDC35DI.js +72 -0
  149. package/dist/tool-registry-BPEJNSZG.js +17 -0
  150. package/dist/tool-validation-Q57YMMBX.js +32 -0
  151. package/dist/type-inference-QMT2RMLV.js +13 -0
  152. package/dist/vector-binary-LMY4QGAN.js +19 -0
  153. package/dist/version-ABP2TUL2.js +9 -0
  154. package/dist/wasm-NMWO3WXY.js +16 -0
  155. package/docs/EMBEDDINGS.md +132 -0
  156. package/docs/README.md +178 -0
  157. package/docs/data/m10-baseline.json +602 -0
  158. package/docs/data/m10-benchmark-baseline.json +57 -0
  159. package/docs/data/m10-benchmark-last-run.json +127 -0
  160. package/docs/data/m10-final-audit.json +215 -0
  161. package/docs/data/m12-final-audit.json +138 -0
  162. package/docs/data/m12-surface-matrix.json +50 -0
  163. package/docs/data/public-tools.json +1902 -0
  164. package/docs/indexing/DEAD-ASSETS.md +88 -0
  165. package/docs/indexing/INDEXER-REVIEW.md +634 -0
  166. package/docs/indexing/PERFORMANCE-FINDINGS.md +106 -0
  167. package/docs/indexing/README.md +427 -0
  168. package/docs/indexing/discovery-matrix.md +41 -0
  169. package/docs/indexing/embeddings.md +325 -0
  170. package/docs/indexing/environment-variables.md +77 -0
  171. package/docs/indexing/performance.md +323 -0
  172. package/docs/indexing/resume.md +345 -0
  173. package/docs/indexing/troubleshooting.md +391 -0
  174. package/docs/man/bb.1 +190 -0
  175. package/docs/tools/bb_analyze.md +147 -0
  176. package/docs/tools/bb_annotate.md +110 -0
  177. package/docs/tools/bb_annotations.md +106 -0
  178. package/docs/tools/bb_ask.md +101 -0
  179. package/docs/tools/bb_cross_language.md +103 -0
  180. package/docs/tools/bb_doc.md +169 -0
  181. package/docs/tools/bb_edit.md +185 -0
  182. package/docs/tools/bb_graph.md +169 -0
  183. package/docs/tools/bb_health.md +156 -0
  184. package/docs/tools/bb_impact.md +117 -0
  185. package/docs/tools/bb_index.md +108 -0
  186. package/docs/tools/bb_migrate.md +135 -0
  187. package/docs/tools/bb_patterns.md +140 -0
  188. package/docs/tools/bb_search.md +150 -0
  189. package/docs/tools/bb_security.md +100 -0
  190. package/docs/tools/bb_visualize.md +184 -0
  191. package/grammars/README.md +57 -0
  192. package/grammars/THIRD-PARTY-NOTICES.md +50 -0
  193. package/grammars/tree-sitter-c/LICENSE +21 -0
  194. package/grammars/tree-sitter-clojure/LICENSE.md +21 -0
  195. package/grammars/tree-sitter-cpp/LICENSE +21 -0
  196. package/grammars/tree-sitter-csharp/LICENSE +21 -0
  197. package/grammars/tree-sitter-css/LICENSE +21 -0
  198. package/grammars/tree-sitter-css/README.md +21 -0
  199. package/grammars/tree-sitter-dart/LICENSE +20 -0
  200. package/grammars/tree-sitter-dart-upstream/LICENSE +20 -0
  201. package/grammars/tree-sitter-dart-upstream/README.md +18 -0
  202. package/grammars/tree-sitter-elixir/LICENSE +176 -0
  203. package/grammars/tree-sitter-elixir/README.md +11 -0
  204. package/grammars/tree-sitter-fsharp/LICENSE +21 -0
  205. package/grammars/tree-sitter-fsharp/README.md +45 -0
  206. package/grammars/tree-sitter-graphql/LICENSE +21 -0
  207. package/grammars/tree-sitter-graphql/README.md +106 -0
  208. package/grammars/tree-sitter-groovy/LICENSE +21 -0
  209. package/grammars/tree-sitter-groovy/README.md +4 -0
  210. package/grammars/tree-sitter-haskell/LICENSE +21 -0
  211. package/grammars/tree-sitter-haskell/README.md +394 -0
  212. package/grammars/tree-sitter-hcl/CHANGELOG.md +102 -0
  213. package/grammars/tree-sitter-hcl/LICENSE +201 -0
  214. package/grammars/tree-sitter-hcl/README.md +39 -0
  215. package/grammars/tree-sitter-html/LICENSE +21 -0
  216. package/grammars/tree-sitter-html/README.md +21 -0
  217. package/grammars/tree-sitter-julia/LICENSE +21 -0
  218. package/grammars/tree-sitter-julia/README.md +24 -0
  219. package/grammars/tree-sitter-kotlin/LICENSE +9 -0
  220. package/grammars/tree-sitter-lua/LICENSE.md +21 -0
  221. package/grammars/tree-sitter-lua/README.md +29 -0
  222. package/grammars/tree-sitter-make/LICENSE +21 -0
  223. package/grammars/tree-sitter-matlab/LICENSE +19 -0
  224. package/grammars/tree-sitter-matlab/README.md +99 -0
  225. package/grammars/tree-sitter-nim/LICENSE +373 -0
  226. package/grammars/tree-sitter-nim/README.md +46 -0
  227. package/grammars/tree-sitter-objc/LICENSE +21 -0
  228. package/grammars/tree-sitter-objc/README.md +20 -0
  229. package/grammars/tree-sitter-perl/LICENSE +7 -0
  230. package/grammars/tree-sitter-perl/README.md +100 -0
  231. package/grammars/tree-sitter-powershell/LICENSE +21 -0
  232. package/grammars/tree-sitter-powershell/README.md +7 -0
  233. package/grammars/tree-sitter-proto/LICENSE +21 -0
  234. package/grammars/tree-sitter-proto/README.md +105 -0
  235. package/grammars/tree-sitter-r/LICENSE +9 -0
  236. package/grammars/tree-sitter-r/README.md +66 -0
  237. package/grammars/tree-sitter-ruby/LICENSE +22 -0
  238. package/grammars/tree-sitter-scss/LICENSE +21 -0
  239. package/grammars/tree-sitter-scss/README.md +17 -0
  240. package/grammars/tree-sitter-solidity/LICENSE +7 -0
  241. package/grammars/tree-sitter-sql/LICENSE +21 -0
  242. package/grammars/tree-sitter-typescript/LICENSE +21 -0
  243. package/grammars/tree-sitter-vba/LICENSE +21 -0
  244. package/grammars/tree-sitter-vba/README.md +738 -0
  245. package/grammars/tree-sitter-vbnet/LICENSE +21 -0
  246. package/grammars/tree-sitter-vbnet/README.md +322 -0
  247. package/grammars/tree-sitter-xml/LICENSE +19 -0
  248. package/grammars/tree-sitter-yaml/LICENSE +20 -0
  249. package/grammars/tree-sitter-yaml/README.md +21 -0
  250. package/package.json +184 -4
  251. package/wasm/dart.wasm +0 -0
  252. package/wasm/tree-sitter-bash.wasm +0 -0
  253. package/wasm/tree-sitter-c.wasm +0 -0
  254. package/wasm/tree-sitter-c_sharp.wasm +0 -0
  255. package/wasm/tree-sitter-clean.wasm +0 -0
  256. package/wasm/tree-sitter-clojure.wasm +0 -0
  257. package/wasm/tree-sitter-core_schema.wasm +0 -0
  258. package/wasm/tree-sitter-cpp.wasm +0 -0
  259. package/wasm/tree-sitter-css.wasm +0 -0
  260. package/wasm/tree-sitter-dart.wasm +0 -0
  261. package/wasm/tree-sitter-elisp.wasm +0 -0
  262. package/wasm/tree-sitter-elixir.wasm +0 -0
  263. package/wasm/tree-sitter-elm.wasm +0 -0
  264. package/wasm/tree-sitter-embedded_template.wasm +0 -0
  265. package/wasm/tree-sitter-erlang.wasm +0 -0
  266. package/wasm/tree-sitter-fsharp.wasm +0 -0
  267. package/wasm/tree-sitter-fsharp_signature.wasm +0 -0
  268. package/wasm/tree-sitter-go.wasm +0 -0
  269. package/wasm/tree-sitter-graphql.wasm +0 -0
  270. package/wasm/tree-sitter-groovy.wasm +0 -0
  271. package/wasm/tree-sitter-haskell.wasm +0 -0
  272. package/wasm/tree-sitter-hcl.wasm +0 -0
  273. package/wasm/tree-sitter-html.wasm +0 -0
  274. package/wasm/tree-sitter-java.wasm +0 -0
  275. package/wasm/tree-sitter-javascript.wasm +0 -0
  276. package/wasm/tree-sitter-json.wasm +0 -0
  277. package/wasm/tree-sitter-json_schema.wasm +0 -0
  278. package/wasm/tree-sitter-julia.wasm +0 -0
  279. package/wasm/tree-sitter-kotlin.wasm +0 -0
  280. package/wasm/tree-sitter-lua.wasm +0 -0
  281. package/wasm/tree-sitter-make.wasm +0 -0
  282. package/wasm/tree-sitter-markdown.wasm +0 -0
  283. package/wasm/tree-sitter-markdown_inline.wasm +0 -0
  284. package/wasm/tree-sitter-matlab.wasm +0 -0
  285. package/wasm/tree-sitter-nim.wasm +0 -0
  286. package/wasm/tree-sitter-objc.wasm +0 -0
  287. package/wasm/tree-sitter-ocaml.wasm +0 -0
  288. package/wasm/tree-sitter-perl.wasm +0 -0
  289. package/wasm/tree-sitter-php.wasm +0 -0
  290. package/wasm/tree-sitter-php_only.wasm +0 -0
  291. package/wasm/tree-sitter-powershell.wasm +0 -0
  292. package/wasm/tree-sitter-protobuf.wasm +0 -0
  293. package/wasm/tree-sitter-python.wasm +0 -0
  294. package/wasm/tree-sitter-ql.wasm +0 -0
  295. package/wasm/tree-sitter-r.wasm +0 -0
  296. package/wasm/tree-sitter-rescript.wasm +0 -0
  297. package/wasm/tree-sitter-ruby.wasm +0 -0
  298. package/wasm/tree-sitter-rust.wasm +0 -0
  299. package/wasm/tree-sitter-scala.wasm +0 -0
  300. package/wasm/tree-sitter-scss.wasm +0 -0
  301. package/wasm/tree-sitter-solidity.wasm +0 -0
  302. package/wasm/tree-sitter-sql.wasm +0 -0
  303. package/wasm/tree-sitter-svelte.wasm +0 -0
  304. package/wasm/tree-sitter-swift.wasm +0 -0
  305. package/wasm/tree-sitter-systemrdl.wasm +0 -0
  306. package/wasm/tree-sitter-terraform.wasm +0 -0
  307. package/wasm/tree-sitter-tlaplus.wasm +0 -0
  308. package/wasm/tree-sitter-toml.wasm +0 -0
  309. package/wasm/tree-sitter-tsx.wasm +0 -0
  310. package/wasm/tree-sitter-typescript.wasm +0 -0
  311. package/wasm/tree-sitter-vba.wasm +0 -0
  312. package/wasm/tree-sitter-vbnet.wasm +0 -0
  313. package/wasm/tree-sitter-vue.wasm +0 -0
  314. package/wasm/tree-sitter-xml.wasm +0 -0
  315. package/wasm/tree-sitter-yaml.wasm +0 -0
  316. package/wasm/tree-sitter-zig.wasm +0 -0
  317. package/wasm/tree-sitter.wasm +0 -0
  318. package/wasm/tsx.wasm +0 -0
  319. package/wasm/typescript.wasm +0 -0
@@ -0,0 +1,106 @@
1
+ # tree-sitter-graphql — vendored, patched, and pinned
2
+
3
+ This directory is the **source of the wasm the product loads**:
4
+ `wasm/tree-sitter-graphql.wasm`. It is not a mirror of upstream; it is
5
+ upstream plus a measured patch, and the patch is a reviewable diff because
6
+ `grammar.js` is **generated** from `grammar.upstream.js` by `port.py`.
7
+
8
+ ## Why the tree is shaped this way
9
+
10
+ | file | role |
11
+ |---|---|
12
+ | `grammar.upstream.js` | `github.com/bkegley/tree-sitter-graphql` @ `ee5ce96`, verbatim. The port always reads this, so `python3 port.py` is idempotent. |
13
+ | `port.py` | the patch, as code: the PascalCase rename and four FIX hunks, each anchored to upstream's exact text and each refusing to write a half-ported grammar. |
14
+ | `grammar.js` | the generated, patched grammar. **This is what `tree-sitter generate` reads.** |
15
+ | `src/node-types.json`, `src/grammar.json` | generated, and tracked ON PURPOSE: `script/m14/verify-grammar-pins.ts` uses the pair for its offline source↔wasm proof. |
16
+ | `src/parser.c` | generated, 283 KB, **not** tracked. `tree-sitter generate` rebuilds it. |
17
+ | `tree-sitter.json`, `package.json` | ABI 15 build config and npm metadata. `package.json` deliberately has no `"type"` field: the repository root is `"type": "module"`, and `grammar.js` is CommonJS `module.exports`, so without a local `package.json` the CLI cannot load it. |
18
+
19
+ ## Divergence 1 — the rule names are PascalCase, and that is a contract
20
+
21
+ Upstream names its rules `snake_case` (`object_type_definition`). This
22
+ repository's rules are `PascalCase` (`ObjectTypeDefinition`), because:
23
+
24
+ - `src/ast/real-graphql-analyzer.ts` dispatches on `node.type === "ObjectTypeDefinition"`.
25
+ Under upstream's spelling **every construct falls through the analyzer's
26
+ default arm** and the file yields nothing.
27
+ - `script/m12/graphql-node-types-compare.ts`, the m12 shape-safety artifact, the
28
+ m14/m60 language lanes and every stored symbol row assume the PascalCase
29
+ spelling.
30
+ - The wasm this repository vendored **before** this work already exposed
31
+ PascalCase names (built with an older tree-sitter CLI, which PascalCases rule
32
+ names on the analyzer's behalf). The rename preserves that surface rather than
33
+ breaking it.
34
+
35
+ The rename is a mechanical `snake_case → PascalCase` map over 71 rules, pinned
36
+ to the vendored wasm's own `language.nodeTypeForId` table, with `source_file`,
37
+ `comment` and `comma` held lower-case because that is what the previous wasm
38
+ exposed for them.
39
+
40
+ **Upstream's `main` is not a drop-in.** The A/B is in
41
+ `bb_tests/graphql/out/extraction-ab.json`; the measured result of a
42
+ PascalCase-only port is that the analyzer's whole string-literal contract
43
+ becomes dead. That is why this is a *patched port* and not an upgrade.
44
+
45
+ ## Divergence 2 — four specification constructs upstream rejects
46
+
47
+ Each FIX in `port.py` is anchored to a row in the 113-construct battery
48
+ (`bb_tests/graphql/probe/grammar-gaps.mts`) and each was measured, not reasoned.
49
+
50
+ | # | construct | specification | what upstream's rule does | the patch |
51
+ |---|---|---|---|---|
52
+ | FIX 1 | `extend schema { query: Q mutation: M }`, and `extend schema @link(…)` with no body | §3.18 | one `root_operation_type_definition`, and the body is mandatory | `repeat1(...)` inside an optional body, with `prec.right` to resolve the `{` ambiguity (the same resolution every other `*_type_extension` in this grammar already uses) |
53
+ | FIX 2 | `extend scalar S` with no directive | §3.17 | `$.directives` is `repeat1`, so a directive is **mandatory** | `optional($.directives)` |
54
+ | FIX 3 | `{ f @a @b }` — two directives on one field selection | §3.3 | `optional($.directive)`, singular | `optional($.directives)` |
55
+ | FIX 4 | `\"` and `\\` in a `"…"` string; `\"""` in a `"""…"""` block string | §2.9.4 | the short string's regex forbids every backslash, and the block string has no accepting path for `\"""` | short string: `[^"\\\n]` or `\\` + any non-newline; block string: a quote is consumable only when it is not the closing delimiter, and a backslash always consumes the next character |
56
+
57
+ FIX 4 was measured twice. The first attempt wrote the short string's escape as
58
+ `\\[^\\\n]`, whose character class excludes the backslash **itself**, so `\"`,
59
+ `\/` and `\n` all parsed and `\\` did not — 4 of 7 escape probes green. The
60
+ second attempt uses `\\[^\n]`.
61
+
62
+ **Still a gap, deliberately not fixed:** the block-string rule accepts
63
+ `"""a\""""` as the block string `a"` followed by a stray quote. graphql-js agrees
64
+ (`BlockStringValue` is greedy to the last `"""`), so tightening it would make
65
+ this grammar disagree with the reference implementation. Recorded, not hidden.
66
+
67
+ ## Regenerating the wasm
68
+
69
+ ```sh
70
+ cd grammars/tree-sitter-graphql
71
+ python3 port.py # upstream + the patch -> grammar.js
72
+ tree-sitter generate # -> src/{parser.c,grammar.json,node-types.json}
73
+ tree-sitter build --wasm -o ../../wasm/tree-sitter-graphql.wasm
74
+ ```
75
+
76
+ `tree-sitter build --wasm` needs emscripten; with only docker present it uses
77
+ `emscripten/emsdk` through docker automatically. The CLI must be ≥ 0.25 for the
78
+ `tree-sitter.json`/ABI-15 path; the bb_tests copy at
79
+ `/home/ishaq2321/bb_tests/node_modules/tree-sitter-cli` is 0.25.1.
80
+
81
+ **After regenerating, re-run every gate** — the wasm hash is pinned and the
82
+ extraction changes:
83
+
84
+ ```sh
85
+ /home/ishaq2321/bb_tests/graphql/run-all.sh --corpus
86
+ cd /home/ishaq2321/backbencher-brain && bun script/m14/verify-grammar-pins.ts --write
87
+ ```
88
+
89
+ ## What the patch bought, measured
90
+
91
+ 47 real `.graphql` files across four repositories, the same analyzer under both
92
+ grammars (`bb_tests/graphql/out/extraction-ab.json`):
93
+
94
+ | | previous wasm | wired wasm | delta |
95
+ |---|---|---|---|
96
+ | files with a grammar error | **12 / 47** | **4 / 47** | **−8** |
97
+ | grammar error nodes | **20** | **7** | **−13** |
98
+ | symbols | 8,743 | **8,747** | +4 |
99
+ | relationships | 16,861 | **16,937** | +76 |
100
+
101
+ Every delta is enumerated and adjudicated in `REVIEW.md` §E. The direction is
102
+ uniform, and the previous wasm's losses include a class of **phantom facts**: on
103
+ `neo4j-graphql/.../apollo-federation-subgraph-compatibility/schema.graphql` a
104
+ described `extend type User` degraded to ERROR, and the analyzer then published
105
+ `anonymous_operation_1566 → Int`, `→ ID`, `→ @external` and `→ @requires` —
106
+ four invented references — while losing five real `User` field symbols.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Amaan Qureshi <amaanq12@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,4 @@
1
+ ## tree-sitter-groovy
2
+
3
+ > [!Note]
4
+ > this is a WIP and is not super polished, I cobbled this together in an hour to test something, eventually I'd like to clean it up but it works for me for now.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Max Brunsfeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,394 @@
1
+ # tree-sitter-haskell
2
+
3
+ [![CI][ci]](https://github.com/tree-sitter/tree-sitter-haskell/actions/workflows/ci.yml)
4
+ [![discord][discord]](https://discord.gg/w7nTvsVJhm)
5
+ [![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
6
+ [![crates][crates]](https://crates.io/crates/tree-sitter-haskell)
7
+ [![npm][npm]](https://www.npmjs.com/package/tree-sitter-haskell)
8
+ [![pypi][pypi]](https://pypi.org/project/tree-sitter-haskell)
9
+
10
+ Haskell grammar for [tree-sitter].
11
+
12
+ # References
13
+
14
+ - [Haskell 2010 Language Report – Syntax References][ref]
15
+ - [GHC Language Extensions][ext]
16
+
17
+ # Supported Language Extensions
18
+
19
+ These extensions are supported ✅, unsupported ❌ or not applicable because they don't involve parsing ➖️:
20
+
21
+ - AllowAmbiguousTypes ➖️
22
+ - ApplicativeDo ➖️
23
+ - Arrows ❌
24
+ - BangPatterns ✅
25
+ - BinaryLiterals ✅
26
+ - BlockArguments ✅
27
+ - CApiFFI ✅
28
+ - ConstrainedClassMethods ✅
29
+ - ConstraintKinds ✅
30
+ - CPP ✅
31
+ - CUSKs ✅
32
+ - DataKinds ✅
33
+ - DatatypeContexts ✅
34
+ - DefaultSignatures ✅
35
+ - DeriveAnyClass ➖️
36
+ - DeriveDataTypeable ➖️
37
+ - DeriveFoldable ➖️
38
+ - DeriveFunctor ➖️
39
+ - DeriveGeneric ➖️
40
+ - DeriveLift ➖️
41
+ - DeriveTraversable ➖️
42
+ - DerivingStrategies ✅
43
+ - DerivingVia ✅
44
+ - DisambiguateRecordFields ➖️
45
+ - DuplicateRecordFields ➖️
46
+ - EmptyCase ✅
47
+ - EmptyDataDecls ✅
48
+ - EmptyDataDeriving ✅
49
+ - ExistentialQuantification ✅
50
+ - ExplicitForAll ✅
51
+ - ExplicitNamespaces ✅
52
+ - ExtendedDefaultRules ➖️
53
+ - FlexibleContexts ✅
54
+ - FlexibleInstances ✅
55
+ - ForeignFunctionInterface ✅
56
+ - FunctionalDependencies ✅
57
+ - GADTs ✅
58
+ - GADTSyntax ✅
59
+ - GeneralisedNewtypeDeriving ➖️
60
+ - GHCForeignImportPrim ✅
61
+ - Haskell2010 ➖️
62
+ - Haskell98 ➖️
63
+ - HexFloatLiterals ✅
64
+ - ImplicitParams ✅
65
+ - ImplicitPrelude ➖️
66
+ - ImportQualifiedPost ✅
67
+ - ImpredicativeTypes ➖️
68
+ - IncoherentInstances ➖️
69
+ - InstanceSigs ✅
70
+ - InterruptibleFFI ✅
71
+ - KindSignatures ✅
72
+ - LambdaCase ✅
73
+ - LexicalNegation ❌
74
+ - LiberalTypeSynonyms ✅
75
+ - LinearTypes ✅
76
+ - ListTuplePuns ✅
77
+ - MagicHash ✅
78
+ - Modifiers ❌
79
+ - MonadComprehensions ➖️
80
+ - MonadFailDesugaring ➖️
81
+ - MonoLocalBinds ➖️
82
+ - MonomorphismRestriction ➖️
83
+ - MultiParamTypeClasses ✅
84
+ - MultiWayIf ✅
85
+ - NamedFieldPuns ✅
86
+ - NamedWildCards ✅
87
+ - NegativeLiterals ➖️
88
+ - NondecreasingIndentation ✅
89
+ - NPlusKPatterns ➖️
90
+ - NullaryTypeClasses ✅
91
+ - NumDecimals ➖️
92
+ - NumericUnderscores ✅
93
+ - OverlappingInstances ➖️
94
+ - OverloadedLabels ✅
95
+ - OverloadedLists ➖️
96
+ - OverloadedRecordDot ✅
97
+ - OverloadedRecordUpdate ✅
98
+ - OverloadedStrings ➖️
99
+ - PackageImports ✅
100
+ - ParallelListComp ✅
101
+ - PartialTypeSignatures ✅
102
+ - PatternGuards ✅
103
+ - PatternSynonyms ✅
104
+ - PolyKinds ➖️
105
+ - PostfixOperators ➖️
106
+ - QualifiedDo ✅
107
+ - QuantifiedConstraints ✅
108
+ - QuasiQuotes ✅
109
+ - Rank2Types ✅
110
+ - RankNTypes ✅
111
+ - RebindableSyntax ➖️
112
+ - RecordWildCards ➖️
113
+ - RecursiveDo ✅
114
+ - RequiredTypeArguments ✅
115
+ - RoleAnnotations ✅
116
+ - Safe ➖️
117
+ - ScopedTypeVariables ✅
118
+ - StandaloneDeriving ✅
119
+ - StandaloneKindSignatures ✅
120
+ - StarIsType ✅
121
+ - StaticPointers ❌
122
+ - Strict ➖️
123
+ - StrictData ✅
124
+ - TemplateHaskell ✅
125
+ - TemplateHaskellQuotes ✅
126
+ - TraditionalRecordSyntax ➖️
127
+ - TransformListComp ✅
128
+ - Trustworthy ➖️
129
+ - TupleSections ✅
130
+ - TypeAbstractions ✅
131
+ - TypeApplications ✅
132
+ - TypeData ✅
133
+ - TypeFamilies ✅
134
+ - TypeFamilyDependencies ✅
135
+ - TypeInType ✅
136
+ - TypeOperators ✅
137
+ - TypeSynonymInstances ➖️
138
+ - UnboxedSums ✅
139
+ - UnboxedTuples ✅
140
+ - UndecidableInstances ➖️
141
+ - UndecidableSuperClasses ➖️
142
+ - UnicodeSyntax ✅
143
+ - UnliftedFFITypes ➖️
144
+ - UnliftedNewtypes ✅
145
+ - Unsafe ➖️
146
+ - ViewPatterns ✅
147
+
148
+ # Bugs
149
+
150
+ ## CPP
151
+
152
+ Preprocessor `#elif` and `#else` directives cannot be handled correctly, since the parser state would have to be
153
+ manually reset to what it was at the `#if`.
154
+ As a workaround, the code blocks in the alternative branches are parsed as part of the directives.
155
+
156
+ # Querying
157
+
158
+ The grammar contains several [supertypes](https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types),
159
+ which group multiple other node types under a single name.
160
+
161
+ Supertype names do not occur as extra nodes in parse trees, but they can be used in queries in special ways:
162
+
163
+ - As an alias, matching any of their subtypes
164
+ - As prefix for one of their subtypes, matching its symbol only when it occurs as a production of the supertype
165
+
166
+ For example, the query `(expression)` matches the nodes `infix`, `record`, `projection`, `constructor`, and the second
167
+ and third `variable` in this tree for `cats <> Cat {mood = moods.sleepy}`:
168
+
169
+ ```
170
+ (infix
171
+ (variable)
172
+ (operator)
173
+ (record
174
+ (constructor)
175
+ (field_update
176
+ (field_name (variable))
177
+ (projection (variable) (field_name (variable)))))))))
178
+ ```
179
+
180
+ The two occurrences of `variable` in `field_name` (`mood` and `sleepy`) are not expressions, but record field names part
181
+ of a composite `record` expression.
182
+
183
+ Matching `variable` nodes specifically that are expressions is possible with the second special form.
184
+ A query for `(expression/variable)` will match only the other two, `cats` and `moods`.
185
+
186
+ The grammar's supertypes consist of the following sets:
187
+
188
+ - [`expression`](./grammar/exp.js)
189
+
190
+ Rules that are valid in any expression position, excluding type applications, explicit types and expression
191
+ signatures.
192
+
193
+ - [`pattern`](./grammar/pat.js)
194
+
195
+ Rules that are valid in any pattern position, excluding type binders, explicit types and pattern signatures.
196
+
197
+ - [`type`](./grammar/type.js)
198
+
199
+ Types that are either atomic (have no ambiguous associativity, like bracketed constructs, variables and type
200
+ constructors), applied types or infix types.
201
+
202
+ - [`quantified_type`](./grammar/type.js)
203
+
204
+ Types prefixed with a `forall`, context or function parameter.
205
+
206
+ - [`constraint`](./grammar/constraint.js)
207
+
208
+ Almost the same rules as `type`, but mirrored for use in contexts.
209
+
210
+ - [`constraints`](./grammar/constraints.js)
211
+
212
+ Analog of `quantified_type`, for constraints with `forall` or context.
213
+
214
+ - [`type_param`](./grammar/type.js)
215
+
216
+ Atomic nodes in type and class heads, like the three nodes following `A` in `data A @k a (b :: k)`.
217
+
218
+ - [`declaration`](./grammar/module.js)
219
+
220
+ All top-level declarations, like functions and data types.
221
+
222
+ - [`decl`](./grammar/decl.js)
223
+
224
+ Shorthand for declarations that are also valid in local bindings (`let` and `where`) and in class and instance bodies,
225
+ except for fixity declarations.
226
+ Consists of `signature`, `function` and `bind`.
227
+
228
+ - [`class_decl` and `instance_decl`](./grammar/class.js)
229
+
230
+ All declarations that are valid in classes and instances, which includes associated type and data families.
231
+
232
+ - [`statement`](./grammar/exp.js)
233
+
234
+ Different forms of `do`-notation statements.
235
+
236
+ - [`qualifier`](./grammar/exp.js)
237
+
238
+ Different forms of list comprehension qualifiers.
239
+
240
+ - [`guard`](./grammar/exp.js)
241
+
242
+ Different forms of guards in function equations and case alternatives.
243
+
244
+ # Development
245
+
246
+ The main driver for generating and testing the parser for this grammar is the [tree-sitter CLI][cli].
247
+ Other components of the project require additional tools, described below.
248
+
249
+ Some are made available through `npm` – for example, `npx tree-sitter` runs the CLI.
250
+ If you don't have `tree-sitter` available otherwise, prefix all the commands in the following sections with `npx`.
251
+
252
+ ## Output path
253
+
254
+ The CLI writes the shared library containing the parser to the directory denoted by `$TREE_SITTER_LIBDIR`.
255
+ If that variable is unset, it defaults to `$HOME/.cache/tree-sitter/lib`.
256
+
257
+ In order to avoid clobbering this global directory with development versions, you can set the env var to a local path:
258
+
259
+ ```
260
+ export TREE_SITTER_LIBDIR=$PWD/.lib
261
+ ```
262
+
263
+ ## The grammar
264
+
265
+ The javascript file `grammar.js` contains the entry point into the grammar's production rules.
266
+ Please consult the [tree-sitter documentation][grammar-docs] for a comprehensive introduction to the syntax and
267
+ semantics.
268
+
269
+ Parsing starts with the first item in the `rules` field:
270
+
271
+ ```javascript
272
+ {
273
+ rules: {
274
+ haskell: $ => seq(
275
+ optional($.header),
276
+ optional($._body),
277
+ ),
278
+ }
279
+ }
280
+ ```
281
+
282
+ ## Generating the parser
283
+
284
+ The first step in the development workflow converts the javascript rule definitions to C code in `src/parser.c`:
285
+
286
+ ```
287
+ $ tree-sitter generate
288
+ ```
289
+
290
+ Two byproducts of this process are written to `src/grammar.json` and `src/node-types.json`.
291
+
292
+ ## Compiling the parser
293
+
294
+ The C code is automatically compiled by most of the test tools mentioned below, but you can instruct tree-sitter to do
295
+ it in one go:
296
+
297
+ ```
298
+ $ tree-sitter generate --build
299
+ ```
300
+
301
+ If you've set `$TREE_SITTER_LIBDIR` as mentioned above, the shared object will be written to `$PWD/.lib/haskell.so`.
302
+
303
+ Aside from the generated `src/parser.c`, tree-sitter will also compile and link `src/scanner.c` into this object.
304
+ This file contains the _external scanner_, which is a custom extension of the built-in lexer whose purpose is to handle
305
+ language constructs that cannot be expressed (efficiently) in the javascript grammar, like Haskell layouts.
306
+
307
+ ### WebAssembly
308
+
309
+ The parser can be compiled to WebAssembly as well, which requires `emscripten`:
310
+
311
+ ```
312
+ $ tree-sitter build --wasm
313
+ ```
314
+
315
+ The resulting binary is written to `$PWD/tree-sitter-haskell.wasm`.
316
+
317
+ ## Testing the parser
318
+
319
+ The most fundamental test infrastructure for tree-sitter grammars consists of a set of code snippets with associated
320
+ reference ASTs stored in `./test/corpus/*.txt`.
321
+
322
+ ```
323
+ $ tree-sitter test
324
+ ```
325
+
326
+ Individual tests can be run by specifying (a substring of) their description with `-f`:
327
+
328
+ ```
329
+ $ tree-sitter test -f 'module: exports empty'
330
+ ```
331
+
332
+ The project contains several other types of tests:
333
+
334
+ - `test/parse/run.bash [update] [test names ...]` parses the files in `test/parse/*.hs` and compares the output with
335
+ `test/parse/*.target`.
336
+ If `update` is specified as the first argument, it will update the `.target` file for the first failing test.
337
+
338
+ - `test/query/run.bash [update] [test names ...]` parses the files in `test/query/*.hs`, applies the queries in
339
+ `test/query/*.query` and compares the output with `test/query/*.target`, similar to `test/parse`.
340
+
341
+ - `test/rust/parse-test.rs` contains a few tests that use tree-sitter's Rust API to extract the test ranges for
342
+ terminals in a slightly more convenient way.
343
+ This requires `cargo` to be installed, and can be executed with `cargo test` (which also runs the tests in
344
+ `bindings/rust`).
345
+
346
+ - `test/parse-libs [wasm]` clones a set of Haskell libraries to `test/libs` and parses the entire codebase.
347
+ When invoked as `test/parse-libs wasm`, it will use the WebAssembly parser.
348
+ This requires `bc` to be installed.
349
+
350
+ - `test/parse-lib name [wasm]` parses only the library `name` in that directory (without cloning the repository).
351
+
352
+ ### Debugging
353
+
354
+ The shared library built by `tree-sitter test` includes debug symbols, so if the scanner segfaults you can just run
355
+ `coredumpctl debug` to inspect the backtrace and memory:
356
+
357
+ ```
358
+ newline_lookahead () at src/scanner.c:2583
359
+ 2583 ((Newline *) 0)->indent = 5;
360
+ (gdb) bt
361
+ #0 newline_lookahead () at src/scanner.c:2583
362
+ #1 0x00007ffff7a0740e in newline_start () at src/scanner.c:2604
363
+ #2 scan () at src/scanner.c:2646
364
+ #3 eval () at src/scanner.c:2684
365
+ #4 tree_sitter_haskell_external_scanner_scan (payload=<optimized out>, lexer=<optimized out>,
366
+ valid_symbols=<optimized out>) at src/scanner.c:2724
367
+ #5 0x0000555555772488 in ts_parser.lex ()
368
+ ```
369
+
370
+ For more control, launch `gdb tree-sitter` and start the process with `run test -f 'some test'`, and set a breakpoint
371
+ with `break tree_sitter_haskell_external_scanner_scan`.
372
+
373
+ To disable optimizations, run `tree-sitter test --debug-build`.
374
+
375
+ #### Tracing
376
+
377
+ The `test` and `parse` commands offer two modes for obtaining detailed information about the parsing process.
378
+
379
+ With `tree-sitter test --debug`, every lexer step and shift/reduce action is printed to stderr.
380
+
381
+ With `tree-sitter test --debug-graph`, the CLI will generate an HTML file showing a graph representation of every step.
382
+ This requires `graphviz` to be installed.
383
+
384
+ [tree-sitter]: https://github.com/tree-sitter/tree-sitter
385
+ [ref]: https://www.haskell.org/onlinereport/haskell2010/haskellch10.html
386
+ [ext]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/table.html
387
+ [cli]: https://github.com/tree-sitter/tree-sitter/tree/master/cli
388
+ [grammar-docs]: https://tree-sitter.github.io/tree-sitter/creating-parsers#writing-the-grammar
389
+ [ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-haskell/ci.yml?logo=github&label=CI
390
+ [discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
391
+ [matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
392
+ [npm]: https://img.shields.io/npm/v/tree-sitter-haskell?logo=npm
393
+ [crates]: https://img.shields.io/crates/v/tree-sitter-haskell?logo=rust
394
+ [pypi]: https://img.shields.io/pypi/v/tree-sitter-haskell?logo=pypi&logoColor=ffd242
@@ -0,0 +1,102 @@
1
+ # Changelog
2
+
3
+ ## 1.2.0 - 2025-06-15
4
+
5
+ feat:
6
+ * namespaced identitifers
7
+
8
+ fix:
9
+ * precedence of unary operators and expressions
10
+
11
+ housekeeping:
12
+ * regenerate with tree-sitter-cli 0.25.6
13
+ * add bindings
14
+
15
+ ## 1.1.0 - 2023-07-25
16
+
17
+ feature
18
+ * add dialects so we can have different queries in `nvim-treesitter`
19
+
20
+ fix:
21
+ * fix ci acceptance workflow
22
+
23
+ housekeeping:
24
+ * reformat using LSPs, ditch editorconfig
25
+
26
+ ## 1.0.0 - 2022-12-02
27
+
28
+ breaking:
29
+ * remove `template_if_branch` and `template_else_branch`
30
+
31
+ fix:
32
+ * fix precedence in template expressions
33
+
34
+ ## 0.7.0 - 2022-06-02
35
+
36
+ housekeeping:
37
+ * bump tree-sitter dependency to 0.20.6
38
+ * regenerate parser
39
+ * fix clang+windows CI job
40
+
41
+ fix:
42
+ * allow empty string literals
43
+
44
+ ## 0.6.0 - 2021-09-20
45
+
46
+ feature:
47
+ * add template for expressions
48
+ * add template if expressions
49
+
50
+ cleanup:
51
+ * move fuzzing instrumentation to different repository
52
+
53
+ ## 0.5.0 - 2021-09-15
54
+
55
+ feature:
56
+ * unhide `(block|object|tuple)_(start|end)` tokens
57
+
58
+ fix:
59
+ * remove empty `template_directive` block because it causes issues for semgrep
60
+
61
+ ## 0.4.0 - 2021-07-02
62
+
63
+ feature:
64
+ * add named "key" and "val" fields to left and right side of object elements
65
+ * unhide the `template_interpolation_(start|end)` and `quoted_template_(start|end)` tokens
66
+
67
+ ## 0.3.2 - 2021-07-01
68
+
69
+ fix:
70
+ * add a build step to CI to make sure the scanner is compilable
71
+ * add fuzzing instrumentation
72
+
73
+ ## 0.3.1 - 2021-06-30
74
+
75
+ fix:
76
+ * dont use c struct initializer syntax in src/scanner.cc
77
+
78
+ ## 0.3.0 - 2021-06-28
79
+
80
+ fix:
81
+ * correct expression for identifiers
82
+ * allow empty template interpolations
83
+ * allow empty templates
84
+ * fix crash when `context_stack.size()` exceeds `CHAR_MAX`
85
+ * fix crash when `heredoc_identifier.size()` exceeds `CHAR_MAX`
86
+
87
+ quality:
88
+ * add fuzzing
89
+
90
+ ## 0.2.0 - 2021-06-26
91
+
92
+ feature:
93
+ * add quoted templates and heredoc templates
94
+ * still missing template directives though
95
+
96
+ quality:
97
+ * collect corpus of real world hcl files from github
98
+ * add github actions
99
+
100
+ ## 0.1.0 - 2021-06-13
101
+
102
+ * initial version