@lumis-sh/wasm-lean 0.0.0-stage → 0.26.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Leandro Pereira
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.
package/README.md CHANGED
@@ -1,3 +1,52 @@
1
- # Temporary Holding Version
1
+ # @lumis-sh/wasm-lean
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Self-contained Lumis language package for lean.
4
+
5
+ The Tree-sitter parser is compiled to WASM and ships with the queries that highlight it.
6
+
7
+ Built with [`tree-sitter build --wasm`](https://tree-sitter.github.io/tree-sitter/cli/build.html) `v0.26.11`
8
+
9
+ Used by [Lumis](https://lumis.sh) and compatible with [web-tree-sitter](https://www.npmjs.com/package/web-tree-sitter) v0.26 and other WASM runtimes.
10
+
11
+ ## Installation
12
+
13
+ ```sh
14
+ npm install @lumis-sh/wasm-lean
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ The package exports the language, ready for Lumis, in Node and in a browser:
20
+
21
+ ```js
22
+ import { createHighlighter } from '@lumis-sh/lumis'
23
+ import lean from '@lumis-sh/wasm-lean'
24
+
25
+ const highlighter = await createHighlighter({ languages: [lean] })
26
+ ```
27
+
28
+ ## What it contains
29
+
30
+ `tree-sitter-lean.wasm` is the parser. `lumis.json` describes it and records its size, its SHA-256 and the queries.
31
+
32
+ Node reads both from the installed package, and a bundler ships them with your code, so nothing is downloaded at runtime.
33
+
34
+ ## Parser
35
+
36
+ | Parser | Version | Rev |
37
+ | ------ | ------- | --- |
38
+ | [https://github.com/Julian/tree-sitter-lean.git](https://github.com/Julian/tree-sitter-lean.git) | 0.2.0 | 0d28e5d6e8c4755f5df7ef9bde3b6ec6f59fae94 |
39
+
40
+ The same parser is published to Hex as
41
+ [`lumis_wasm_lean`](https://hex.pm/packages/lumis_wasm_lean) — byte for byte, from
42
+ one build, so both registries serve the same artifact.
43
+
44
+ ## CDN
45
+
46
+ - [https://unpkg.com/@lumis-sh/wasm-lean@0.26.0/tree-sitter-lean.wasm](https://unpkg.com/@lumis-sh/wasm-lean@0.26.0/tree-sitter-lean.wasm)
47
+ - [https://cdn.jsdelivr.net/npm/@lumis-sh/wasm-lean@0.26.0/tree-sitter-lean.wasm](https://cdn.jsdelivr.net/npm/@lumis-sh/wasm-lean@0.26.0/tree-sitter-lean.wasm)
48
+
49
+ ## License
50
+
51
+ The Lumis packaging is MIT. The parser itself is redistributed from the
52
+ upstream project above; see that project for its license.
package/index.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * A language from this package. Pass it to `createHighlighter({ languages })`
3
+ * from `@lumis-sh/lumis`, in Node or in a browser.
4
+ */
5
+ export interface Language {
6
+ id: string
7
+ aliases: string[]
8
+ packageName: string
9
+ /**
10
+ * The parser, which a bundler ships next to your code: a `URL`, or a
11
+ * `WebAssembly.Module` on Cloudflare Workers and Vercel's Edge runtime.
12
+ */
13
+ wasm: URL | WebAssembly.Module
14
+ languagePackage: LanguagePackage
15
+ /** Grammars this language cannot highlight without, loaded along with it. */
16
+ requires?: Language[]
17
+ }
18
+
19
+ /** This package's `lumis.json`: the parser's digest, and the queries released with it. */
20
+ export interface LanguagePackage {
21
+ packageName: string
22
+ version: string
23
+ [field: string]: unknown
24
+ }
25
+
26
+ export declare const languagePackage: LanguagePackage
27
+ export declare const lean: Language
28
+ export { lean as default }
package/index.edge.js ADDED
@@ -0,0 +1,15 @@
1
+ import { languagePackage } from './language-package.js'
2
+
3
+ import wasm from './tree-sitter-lean.wasm?module'
4
+
5
+ export { languagePackage }
6
+
7
+ export const lean = {
8
+ id: "lean",
9
+ aliases: ["lean4"],
10
+ packageName: "@lumis-sh/wasm-lean",
11
+ wasm,
12
+ languagePackage,
13
+ }
14
+
15
+ export default lean
package/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import { languagePackage } from './language-package.js'
2
+
3
+ const wasm = new URL('./tree-sitter-lean.wasm', import.meta.url)
4
+
5
+ export { languagePackage }
6
+
7
+ export const lean = {
8
+ id: "lean",
9
+ aliases: ["lean4"],
10
+ packageName: "@lumis-sh/wasm-lean",
11
+ wasm,
12
+ languagePackage,
13
+ }
14
+
15
+ export default lean
@@ -0,0 +1,15 @@
1
+ import { languagePackage } from './language-package.js'
2
+
3
+ import wasm from './tree-sitter-lean.wasm'
4
+
5
+ export { languagePackage }
6
+
7
+ export const lean = {
8
+ id: "lean",
9
+ aliases: ["lean4"],
10
+ packageName: "@lumis-sh/wasm-lean",
11
+ wasm,
12
+ languagePackage,
13
+ }
14
+
15
+ export default lean
@@ -0,0 +1,24 @@
1
+ export const languagePackage = {
2
+ "packageName": "@lumis-sh/wasm-lean",
3
+ "version": "0.26.0",
4
+ "definitionHash": "22e90bd711a794d2af9c7ee3240449e311b54a310898836f2f04e90c84aeaf2e",
5
+ "parser": {
6
+ "name": "tree-sitter-lean",
7
+ "grammarName": "lean",
8
+ "upstreamVersion": "0.2.0",
9
+ "revision": "0d28e5d6e8c4755f5df7ef9bde3b6ec6f59fae94",
10
+ "sha256": "c920b31a30231d862c6c7a59c8377ef1cefa1a749292ec343bfdce6fed964b36",
11
+ "size": 8237562
12
+ },
13
+ "languages": {
14
+ "lean": {
15
+ "aliases": [
16
+ "lean4"
17
+ ],
18
+ "highlights": "; This file is auto-generated. Do not edit.\n; Highlight queries for tree-sitter-lean.\n;\n; Capture names follow the nvim-treesitter capture convention, which maps\n; back to Lean's SemanticTokenType vocabulary (see\n; lean4/src/Lean/Data/Lsp/LanguageFeatures.lean\n; for the authoritative list). When the Lean LSP server is attached, its\n; semantic tokens take precedence over these queries at runtime; the\n; queries provide the floor for offline/cold-start highlighting.\n\n; ---------- comments ------------------------------------------------------\n\n(line_comment) @comment\n(block_comment) @comment\n(doc_comment) @comment.documentation\n(module_doc_comment) @comment.documentation\n\n; ---------- literals ------------------------------------------------------\n\n(num_lit) @number\n(scientific_lit) @number.float\n(char_lit) @character\n(str_lit) @string\n(raw_string) @string.special\n(interpolated_str) @string\n(escape_sequence) @string.escape\n(name_lit) @string.special.symbol\n\n(true_const) @boolean\n(false_const) @boolean\n\n((sorry) @keyword.exception) ; Lean tags `sorry`/`admit` as leanSorryLike\n\n; ---------- type-level constants ------------------------------------------\n\n(type_const) @type.builtin\n(sort_const) @type.builtin\n(prop_const) @type.builtin\n\n; ---------- identifiers ---------------------------------------------------\n\n; Plain identifier — default to variable. More-specific queries below\n; override for declaration names, types, etc.\n(identifier) @variable\n\n; Holes & meta-variables.\n(hole) @variable.builtin\n(synth_hole) @variable.builtin\n(named_hole (identifier) @variable.builtin)\n\n; ---------- declaration names --------------------------------------------\n\n(def name: (identifier) @function)\n(theorem name: (identifier) @function)\n(abbrev name: (identifier) @function)\n(opaque name: (identifier) @function)\n(constant name: (identifier) @function)\n(axiom name: (identifier) @function)\n(instance name: (identifier) @function)\n\n(structure name: (identifier) @type)\n(inductive name: (identifier) @type)\n\n(ctor name: (identifier) @constructor)\n(ctor_alt name: (identifier) @constructor)\n\n(field name: (identifier) @property)\n\n; Namespace / section names.\n(namespace name: (identifier) @namespace)\n(section name: (identifier) @namespace)\n(end name: (identifier) @namespace)\n\n; Universe names.\n(universe name: (identifier) @type.parameter)\n\n; Import paths.\n(import name: (identifier) @module)\n(open namespace: (identifier) @module)\n(open only: (identifier) @function)\n(open scoped: (identifier) @module)\n(export namespace: (identifier) @module)\n(export only: (identifier) @function)\n\n; Attribute names.\n(attributes name: (identifier) @attribute)\n\n; Projection / field access.\n(proj field: (identifier) @property)\n(proj field: (num_lit) @number)\n\n; Named-argument labels.\n(paren arg_name: (identifier) @variable.parameter)\n\n; Function call: highlight the called name as @function when it's a\n; bare identifier.\n(app fn: (identifier) @function.call)\n\n; ---------- keywords ------------------------------------------------------\n\n; Module-system keywords. `module`/`prelude`/`public`/`meta`/`all` each\n; have a same-named rule wrapping the literal, so we query the rules\n; rather than the bare strings.\n(moduleTk) @keyword.import\n(prelude) @keyword.import\n(public) @keyword.import\n(meta) @keyword.import\n(all) @keyword.import\n\"import\" @keyword.import\n(public_section) @keyword.import\n\n[\n \"namespace\"\n \"section\"\n \"end\"\n] @keyword\n\n[\n \"def\"\n \"theorem\"\n \"example\"\n \"abbrev\"\n \"instance\"\n \"axiom\"\n \"opaque\"\n \"constant\"\n \"structure\"\n \"inductive\"\n \"class\"\n] @keyword\n\n[\n \"variable\"\n \"universe\"\n \"universes\"\n \"open\"\n \"export\"\n \"extends\"\n \"deriving\"\n \"where\"\n] @keyword\n\n[\n \"noncomputable\"\n \"partial\"\n \"nonrec\"\n \"private\"\n \"protected\"\n \"unsafe\"\n \"mut\"\n \"scoped\"\n \"local\"\n] @keyword.modifier\n\n[\n \"#check\"\n \"#eval\"\n \"#print\"\n \"#reduce\"\n] @keyword.directive\n\n[\n \"fun\"\n \"λ\"\n] @keyword.function\n\n[\n \"let\"\n \"have\"\n \"show\"\n \"from\"\n] @keyword\n\n[\n \"if\"\n \"then\"\n \"else\"\n] @keyword.conditional\n\n[\n \"match\"\n \"with\"\n] @keyword.conditional\n\n[\n \"by\"\n \"do\"\n] @keyword\n\n[\n \"forall\"\n \"∀\"\n \"exists\"\n \"∃\"\n] @keyword.operator\n\n; ---------- operators -----------------------------------------------------\n\n[\n \"→\" \"->\" \"↔\" \"<->\" \"↦\" \"=>\"\n \"∨\" \"||\" \"∧\" \"&&\" \"¬\" \"!\"\n \"=\" \"≠\" \"!=\" \"<\" \"≤\" \"<=\" \">\" \"≥\" \">=\"\n \"∈\" \"∉\" \"⊆\" \"⊂\" \"⊇\" \"⊃\"\n \"≡\" \"≢\" \"~\" \"≃\" \"≅\"\n \"::\" \"++\"\n \"+\" \"-\" \"*\" \"/\" \"%\"\n \"∪\" \"∩\" \"\\\\\"\n \"^\" \"∘\"\n \"|>\" \"<|\"\n \">>\" \"<<\" \">>>\" \"<<<\"\n \">>=\" \"=<<\"\n \"<$>\" \"<*>\" \"<|>\" \"<&>\"\n \"&&&\" \"|||\" \"^^^\"\n \"←\" \"<-\"\n] @operator\n\n; ---------- punctuation ---------------------------------------------------\n\n[\":=\" \":\"] @operator\n[\",\" \";\" \"|\"] @punctuation.delimiter\n[\"(\" \")\" \"{\" \"}\" \"[\" \"]\" \"⟨\" \"⟩\" \"⦃\" \"⦄\" \"{{\" \"}}\"] @punctuation.bracket\n[\"@[\" \"]\"] @attribute\n\n; ---------- raw atoms ----------------------------------------------------\n\n[\"`\" \"'\" \"\\\"\" \"s!\\\"\" \"m!\\\"\"] @string",
19
+ "injections": "; This file is auto-generated. Do not edit.\n; Language injections for tree-sitter-lean.\n\n; Doc comments are Markdown / Verso content.\n((doc_comment) @injection.content\n (#set! injection.language \"markdown\"))\n\n((module_doc_comment) @injection.content\n (#set! injection.language \"markdown\"))\n\n; Raw string contents stay plain; no injection beyond default text.",
20
+ "locals": "; This file is auto-generated. Do not edit.\n; Scope-aware queries for tree-sitter-lean.\n\n; ---------- scopes -------------------------------------------------------\n\n[\n (def)\n (theorem)\n (example)\n (abbrev)\n (instance)\n (axiom)\n (opaque)\n (constant)\n (structure)\n (inductive)\n (fun)\n (let)\n (have)\n (forall)\n (exists)\n (match)\n (match_alt)\n (by)\n (do_block)\n (namespace)\n (section)\n] @local.scope\n\n; ---------- definitions --------------------------------------------------\n\n(def name: (identifier) @local.definition.function)\n(theorem name: (identifier) @local.definition.function)\n(abbrev name: (identifier) @local.definition.function)\n(opaque name: (identifier) @local.definition.function)\n(constant name: (identifier) @local.definition.function)\n(axiom name: (identifier) @local.definition.function)\n(instance name: (identifier) @local.definition.function)\n(structure name: (identifier) @local.definition.type)\n(inductive name: (identifier) @local.definition.type)\n\n(field name: (identifier) @local.definition.field)\n(ctor name: (identifier) @local.definition.constructor)\n(ctor_alt name: (identifier) @local.definition.constructor)\n\n(namespace name: (identifier) @local.definition.namespace)\n\n(let name: (identifier) @local.definition.var)\n(have name: (identifier) @local.definition.var)\n(named_hole (identifier) @local.definition.var)\n\n(explicit_binder name: (identifier) @local.definition.parameter)\n(implicit_binder name: (identifier) @local.definition.parameter)\n(strict_implicit_binder name: (identifier) @local.definition.parameter)\n(instance_binder name: (identifier) @local.definition.parameter)\n\n; ---------- references ---------------------------------------------------\n\n(identifier) @local.reference",
21
+ "brackets": "; This file is auto-generated. Do not edit.\n(\"(\" @open\n \")\" @close)\n\n(\"[\" @open\n \"]\" @close)\n\n(\"{\" @open\n \"}\" @close)\n"
22
+ }
23
+ }
24
+ }
package/lumis.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "packageName": "@lumis-sh/wasm-lean",
3
+ "version": "0.26.0",
4
+ "definitionHash": "22e90bd711a794d2af9c7ee3240449e311b54a310898836f2f04e90c84aeaf2e",
5
+ "parser": {
6
+ "name": "tree-sitter-lean",
7
+ "grammarName": "lean",
8
+ "upstreamVersion": "0.2.0",
9
+ "revision": "0d28e5d6e8c4755f5df7ef9bde3b6ec6f59fae94",
10
+ "sha256": "c920b31a30231d862c6c7a59c8377ef1cefa1a749292ec343bfdce6fed964b36",
11
+ "size": 8237562
12
+ },
13
+ "languages": {
14
+ "lean": {
15
+ "aliases": [
16
+ "lean4"
17
+ ],
18
+ "highlights": "; This file is auto-generated. Do not edit.\n; Highlight queries for tree-sitter-lean.\n;\n; Capture names follow the nvim-treesitter capture convention, which maps\n; back to Lean's SemanticTokenType vocabulary (see\n; lean4/src/Lean/Data/Lsp/LanguageFeatures.lean\n; for the authoritative list). When the Lean LSP server is attached, its\n; semantic tokens take precedence over these queries at runtime; the\n; queries provide the floor for offline/cold-start highlighting.\n\n; ---------- comments ------------------------------------------------------\n\n(line_comment) @comment\n(block_comment) @comment\n(doc_comment) @comment.documentation\n(module_doc_comment) @comment.documentation\n\n; ---------- literals ------------------------------------------------------\n\n(num_lit) @number\n(scientific_lit) @number.float\n(char_lit) @character\n(str_lit) @string\n(raw_string) @string.special\n(interpolated_str) @string\n(escape_sequence) @string.escape\n(name_lit) @string.special.symbol\n\n(true_const) @boolean\n(false_const) @boolean\n\n((sorry) @keyword.exception) ; Lean tags `sorry`/`admit` as leanSorryLike\n\n; ---------- type-level constants ------------------------------------------\n\n(type_const) @type.builtin\n(sort_const) @type.builtin\n(prop_const) @type.builtin\n\n; ---------- identifiers ---------------------------------------------------\n\n; Plain identifier — default to variable. More-specific queries below\n; override for declaration names, types, etc.\n(identifier) @variable\n\n; Holes & meta-variables.\n(hole) @variable.builtin\n(synth_hole) @variable.builtin\n(named_hole (identifier) @variable.builtin)\n\n; ---------- declaration names --------------------------------------------\n\n(def name: (identifier) @function)\n(theorem name: (identifier) @function)\n(abbrev name: (identifier) @function)\n(opaque name: (identifier) @function)\n(constant name: (identifier) @function)\n(axiom name: (identifier) @function)\n(instance name: (identifier) @function)\n\n(structure name: (identifier) @type)\n(inductive name: (identifier) @type)\n\n(ctor name: (identifier) @constructor)\n(ctor_alt name: (identifier) @constructor)\n\n(field name: (identifier) @property)\n\n; Namespace / section names.\n(namespace name: (identifier) @namespace)\n(section name: (identifier) @namespace)\n(end name: (identifier) @namespace)\n\n; Universe names.\n(universe name: (identifier) @type.parameter)\n\n; Import paths.\n(import name: (identifier) @module)\n(open namespace: (identifier) @module)\n(open only: (identifier) @function)\n(open scoped: (identifier) @module)\n(export namespace: (identifier) @module)\n(export only: (identifier) @function)\n\n; Attribute names.\n(attributes name: (identifier) @attribute)\n\n; Projection / field access.\n(proj field: (identifier) @property)\n(proj field: (num_lit) @number)\n\n; Named-argument labels.\n(paren arg_name: (identifier) @variable.parameter)\n\n; Function call: highlight the called name as @function when it's a\n; bare identifier.\n(app fn: (identifier) @function.call)\n\n; ---------- keywords ------------------------------------------------------\n\n; Module-system keywords. `module`/`prelude`/`public`/`meta`/`all` each\n; have a same-named rule wrapping the literal, so we query the rules\n; rather than the bare strings.\n(moduleTk) @keyword.import\n(prelude) @keyword.import\n(public) @keyword.import\n(meta) @keyword.import\n(all) @keyword.import\n\"import\" @keyword.import\n(public_section) @keyword.import\n\n[\n \"namespace\"\n \"section\"\n \"end\"\n] @keyword\n\n[\n \"def\"\n \"theorem\"\n \"example\"\n \"abbrev\"\n \"instance\"\n \"axiom\"\n \"opaque\"\n \"constant\"\n \"structure\"\n \"inductive\"\n \"class\"\n] @keyword\n\n[\n \"variable\"\n \"universe\"\n \"universes\"\n \"open\"\n \"export\"\n \"extends\"\n \"deriving\"\n \"where\"\n] @keyword\n\n[\n \"noncomputable\"\n \"partial\"\n \"nonrec\"\n \"private\"\n \"protected\"\n \"unsafe\"\n \"mut\"\n \"scoped\"\n \"local\"\n] @keyword.modifier\n\n[\n \"#check\"\n \"#eval\"\n \"#print\"\n \"#reduce\"\n] @keyword.directive\n\n[\n \"fun\"\n \"λ\"\n] @keyword.function\n\n[\n \"let\"\n \"have\"\n \"show\"\n \"from\"\n] @keyword\n\n[\n \"if\"\n \"then\"\n \"else\"\n] @keyword.conditional\n\n[\n \"match\"\n \"with\"\n] @keyword.conditional\n\n[\n \"by\"\n \"do\"\n] @keyword\n\n[\n \"forall\"\n \"∀\"\n \"exists\"\n \"∃\"\n] @keyword.operator\n\n; ---------- operators -----------------------------------------------------\n\n[\n \"→\" \"->\" \"↔\" \"<->\" \"↦\" \"=>\"\n \"∨\" \"||\" \"∧\" \"&&\" \"¬\" \"!\"\n \"=\" \"≠\" \"!=\" \"<\" \"≤\" \"<=\" \">\" \"≥\" \">=\"\n \"∈\" \"∉\" \"⊆\" \"⊂\" \"⊇\" \"⊃\"\n \"≡\" \"≢\" \"~\" \"≃\" \"≅\"\n \"::\" \"++\"\n \"+\" \"-\" \"*\" \"/\" \"%\"\n \"∪\" \"∩\" \"\\\\\"\n \"^\" \"∘\"\n \"|>\" \"<|\"\n \">>\" \"<<\" \">>>\" \"<<<\"\n \">>=\" \"=<<\"\n \"<$>\" \"<*>\" \"<|>\" \"<&>\"\n \"&&&\" \"|||\" \"^^^\"\n \"←\" \"<-\"\n] @operator\n\n; ---------- punctuation ---------------------------------------------------\n\n[\":=\" \":\"] @operator\n[\",\" \";\" \"|\"] @punctuation.delimiter\n[\"(\" \")\" \"{\" \"}\" \"[\" \"]\" \"⟨\" \"⟩\" \"⦃\" \"⦄\" \"{{\" \"}}\"] @punctuation.bracket\n[\"@[\" \"]\"] @attribute\n\n; ---------- raw atoms ----------------------------------------------------\n\n[\"`\" \"'\" \"\\\"\" \"s!\\\"\" \"m!\\\"\"] @string",
19
+ "injections": "; This file is auto-generated. Do not edit.\n; Language injections for tree-sitter-lean.\n\n; Doc comments are Markdown / Verso content.\n((doc_comment) @injection.content\n (#set! injection.language \"markdown\"))\n\n((module_doc_comment) @injection.content\n (#set! injection.language \"markdown\"))\n\n; Raw string contents stay plain; no injection beyond default text.",
20
+ "locals": "; This file is auto-generated. Do not edit.\n; Scope-aware queries for tree-sitter-lean.\n\n; ---------- scopes -------------------------------------------------------\n\n[\n (def)\n (theorem)\n (example)\n (abbrev)\n (instance)\n (axiom)\n (opaque)\n (constant)\n (structure)\n (inductive)\n (fun)\n (let)\n (have)\n (forall)\n (exists)\n (match)\n (match_alt)\n (by)\n (do_block)\n (namespace)\n (section)\n] @local.scope\n\n; ---------- definitions --------------------------------------------------\n\n(def name: (identifier) @local.definition.function)\n(theorem name: (identifier) @local.definition.function)\n(abbrev name: (identifier) @local.definition.function)\n(opaque name: (identifier) @local.definition.function)\n(constant name: (identifier) @local.definition.function)\n(axiom name: (identifier) @local.definition.function)\n(instance name: (identifier) @local.definition.function)\n(structure name: (identifier) @local.definition.type)\n(inductive name: (identifier) @local.definition.type)\n\n(field name: (identifier) @local.definition.field)\n(ctor name: (identifier) @local.definition.constructor)\n(ctor_alt name: (identifier) @local.definition.constructor)\n\n(namespace name: (identifier) @local.definition.namespace)\n\n(let name: (identifier) @local.definition.var)\n(have name: (identifier) @local.definition.var)\n(named_hole (identifier) @local.definition.var)\n\n(explicit_binder name: (identifier) @local.definition.parameter)\n(implicit_binder name: (identifier) @local.definition.parameter)\n(strict_implicit_binder name: (identifier) @local.definition.parameter)\n(instance_binder name: (identifier) @local.definition.parameter)\n\n; ---------- references ---------------------------------------------------\n\n(identifier) @local.reference",
21
+ "brackets": "; This file is auto-generated. Do not edit.\n(\"(\" @open\n \")\" @close)\n\n(\"[\" @open\n \"]\" @close)\n\n(\"{\" @open\n \"}\" @close)\n"
22
+ }
23
+ }
24
+ }
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@lumis-sh/wasm-lean",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.26.0",
4
+ "type": "module",
5
+ "types": "./index.d.ts",
6
+ "description": "Tree-sitter parser and queries for lean, compiled to WASM for Lumis",
7
+ "author": "Leandro Pereira",
8
+ "license": "MIT",
9
+ "homepage": "https://lumis.sh",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/leandrocp/lumis.git"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "types": "./index.d.ts",
17
+ "workerd": "./index.workerd.js",
18
+ "edge-light": "./index.edge.js",
19
+ "default": "./index.js"
20
+ },
21
+ "./tree-sitter-lean.wasm": "./tree-sitter-lean.wasm",
22
+ "./lumis.json": "./lumis.json"
23
+ },
24
+ "lumis": {
25
+ "treeSitter": "0.26",
26
+ "formatVersion": 5,
27
+ "definitionHash": "22e90bd711a794d2af9c7ee3240449e311b54a310898836f2f04e90c84aeaf2e"
28
+ },
29
+ "peerDependencies": {
30
+ "@lumis-sh/lumis": ">=0.9.0"
31
+ },
32
+ "peerDependenciesMeta": {
33
+ "@lumis-sh/lumis": { "optional": true }
34
+ },
35
+ "dependencies": {},
36
+ "keywords": ["lumis-sh", "wasm", "tree-sitter"],
37
+ "files": ["*.wasm", "*.json", "*.js", "*.d.ts", "README.md", "LICENSE"]
38
+ }
Binary file