@lumis-sh/wasm-tlaplus 0.0.0-stage → 0.26.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/LICENSE +21 -0
- package/README.md +51 -2
- package/index.d.ts +28 -0
- package/index.edge.js +15 -0
- package/index.js +15 -0
- package/index.workerd.js +15 -0
- package/language-package.js +26 -0
- package/lumis.json +26 -0
- package/package.json +36 -4
- package/tree-sitter-tlaplus.wasm +0 -0
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
|
-
#
|
|
1
|
+
# @lumis-sh/wasm-tlaplus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Self-contained Lumis language package for tlaplus.
|
|
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-tlaplus
|
|
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 tlaplus from '@lumis-sh/wasm-tlaplus'
|
|
24
|
+
|
|
25
|
+
const highlighter = await createHighlighter({ languages: [tlaplus] })
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## What it contains
|
|
29
|
+
|
|
30
|
+
`tree-sitter-tlaplus.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/tlaplus-community/tree-sitter-tlaplus.git](https://github.com/tlaplus-community/tree-sitter-tlaplus.git) | 0.0.0 | add40814fda369f6efd989977b2c498aaddde984 |
|
|
39
|
+
|
|
40
|
+
The same parser is published to Hex as
|
|
41
|
+
[`lumis_wasm_tlaplus`](https://hex.pm/packages/lumis_wasm_tlaplus) — 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-tlaplus@0.26.1/tree-sitter-tlaplus.wasm](https://unpkg.com/@lumis-sh/wasm-tlaplus@0.26.1/tree-sitter-tlaplus.wasm)
|
|
47
|
+
- [https://cdn.jsdelivr.net/npm/@lumis-sh/wasm-tlaplus@0.26.1/tree-sitter-tlaplus.wasm](https://cdn.jsdelivr.net/npm/@lumis-sh/wasm-tlaplus@0.26.1/tree-sitter-tlaplus.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 tlaplus: Language
|
|
28
|
+
export { tlaplus 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-tlaplus.wasm?module'
|
|
4
|
+
|
|
5
|
+
export { languagePackage }
|
|
6
|
+
|
|
7
|
+
export const tlaplus = {
|
|
8
|
+
id: "tlaplus",
|
|
9
|
+
aliases: ["tla","tla+","pluscal"],
|
|
10
|
+
packageName: "@lumis-sh/wasm-tlaplus",
|
|
11
|
+
wasm,
|
|
12
|
+
languagePackage,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default tlaplus
|
package/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { languagePackage } from './language-package.js'
|
|
2
|
+
|
|
3
|
+
const wasm = new URL('./tree-sitter-tlaplus.wasm', import.meta.url)
|
|
4
|
+
|
|
5
|
+
export { languagePackage }
|
|
6
|
+
|
|
7
|
+
export const tlaplus = {
|
|
8
|
+
id: "tlaplus",
|
|
9
|
+
aliases: ["tla","tla+","pluscal"],
|
|
10
|
+
packageName: "@lumis-sh/wasm-tlaplus",
|
|
11
|
+
wasm,
|
|
12
|
+
languagePackage,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default tlaplus
|
package/index.workerd.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { languagePackage } from './language-package.js'
|
|
2
|
+
|
|
3
|
+
import wasm from './tree-sitter-tlaplus.wasm'
|
|
4
|
+
|
|
5
|
+
export { languagePackage }
|
|
6
|
+
|
|
7
|
+
export const tlaplus = {
|
|
8
|
+
id: "tlaplus",
|
|
9
|
+
aliases: ["tla","tla+","pluscal"],
|
|
10
|
+
packageName: "@lumis-sh/wasm-tlaplus",
|
|
11
|
+
wasm,
|
|
12
|
+
languagePackage,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default tlaplus
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const languagePackage = {
|
|
2
|
+
"packageName": "@lumis-sh/wasm-tlaplus",
|
|
3
|
+
"version": "0.26.1",
|
|
4
|
+
"definitionHash": "d004df76e24087f92340eb9c857454d64bf7759511741d5e7a6b5bc84d9fe23b",
|
|
5
|
+
"parser": {
|
|
6
|
+
"name": "tree-sitter-tlaplus",
|
|
7
|
+
"grammarName": "tlaplus",
|
|
8
|
+
"upstreamVersion": "0.0.0",
|
|
9
|
+
"revision": "add40814fda369f6efd989977b2c498aaddde984",
|
|
10
|
+
"sha256": "798ef6befd5a9b6435eace5ef1e04559b5bb054cc5e9a233e02e4bc3fd99db2f",
|
|
11
|
+
"size": 4927432
|
|
12
|
+
},
|
|
13
|
+
"languages": {
|
|
14
|
+
"tlaplus": {
|
|
15
|
+
"aliases": [
|
|
16
|
+
"tla",
|
|
17
|
+
"tla+",
|
|
18
|
+
"pluscal"
|
|
19
|
+
],
|
|
20
|
+
"highlights": "; This file is auto-generated. Do not edit.\n; Keywords\n[\n \"ACTION\"\n \"ASSUME\"\n \"ASSUMPTION\"\n \"AXIOM\"\n \"BY\"\n \"CASE\"\n \"CHOOSE\"\n \"CONSTANT\"\n \"CONSTANTS\"\n \"COROLLARY\"\n \"DEF\"\n \"DEFINE\"\n \"DEFS\"\n \"ELSE\"\n \"EXCEPT\"\n \"EXTENDS\"\n \"HAVE\"\n \"HIDE\"\n \"IF\"\n \"IN\"\n \"INSTANCE\"\n \"LAMBDA\"\n \"LEMMA\"\n \"LET\"\n \"LOCAL\"\n \"MODULE\"\n \"NEW\"\n \"OBVIOUS\"\n \"OMITTED\"\n \"ONLY\"\n \"OTHER\"\n \"PICK\"\n \"PROOF\"\n \"PROPOSITION\"\n \"PROVE\"\n \"QED\"\n \"RECURSIVE\"\n \"SF_\"\n \"STATE\"\n \"SUFFICES\"\n \"TAKE\"\n \"TEMPORAL\"\n \"THEN\"\n \"THEOREM\"\n \"USE\"\n \"VARIABLE\"\n \"VARIABLES\"\n \"WF_\"\n \"WITH\"\n \"WITNESS\"\n (address)\n (all_map_to)\n (assign)\n (case_arrow)\n (case_box)\n (def_eq)\n (exists)\n (forall)\n (gets)\n (label_as)\n (maps_to)\n (set_in)\n (temporal_exists)\n (temporal_forall)\n] @keyword\n\n; Pluscal keywords\n[\n (pcal_algorithm_start)\n \"algorithm\"\n \"assert\"\n \"begin\"\n \"call\"\n \"define\"\n \"end\"\n \"fair\"\n \"goto\"\n \"macro\"\n \"or\"\n \"procedure\"\n \"process\"\n (pcal_skip)\n \"variable\"\n \"variables\"\n \"when\"\n \"with\"\n] @keyword\n\n\"await\" @keyword.coroutine\n\n(pcal_with\n \"=\" @keyword)\n\n(pcal_process\n \"=\" @keyword)\n\n[\n \"if\"\n \"then\"\n \"else\"\n \"elsif\"\n (pcal_end_if)\n \"either\"\n (pcal_end_either)\n] @keyword.conditional\n\n[\n \"while\"\n \"do\"\n (pcal_end_while)\n \"with\"\n (pcal_end_with)\n] @keyword.repeat\n\n(pcal_return) @keyword.return\n\n\"print\" @function.macro\n\n; Literals\n(binary_number\n (format) @keyword)\n\n(binary_number\n (value) @number)\n\n(boolean) @boolean\n\n(boolean_set) @type\n\n(hex_number\n (format) @keyword)\n\n(hex_number\n (value) @number)\n\n(int_number_set) @type\n\n(nat_number) @number\n\n(nat_number_set) @type\n\n(octal_number\n (format) @keyword)\n\n(octal_number\n (value) @number)\n\n(real_number) @number\n\n(real_number_set) @type\n\n(string) @string\n\n(escape_char) @string.escape\n\n(string_set) @type\n\n; Namespaces\n(extends\n (identifier_ref) @module)\n\n(instance\n (identifier_ref) @module)\n\n(module\n name: (identifier) @module)\n\n(pcal_algorithm\n name: (identifier) @module)\n\n; Operators, functions, and macros\n(bound_infix_op\n symbol: (_) @operator)\n\n(bound_nonfix_op\n symbol: (_) @operator)\n\n(bound_postfix_op\n symbol: (_) @operator)\n\n(bound_prefix_op\n symbol: (_) @operator)\n\n(prefix_op_symbol) @operator\n\n(infix_op_symbol) @operator\n\n(postfix_op_symbol) @operator\n\n(function_definition\n name: (identifier) @function)\n\n(module_definition\n name: (_) @keyword.import)\n\n(operator_definition\n name: (_) @function.macro)\n\n(pcal_macro_decl\n name: (identifier) @function.macro)\n\n(pcal_macro_call\n name: (identifier) @function.macro)\n\n(pcal_proc_decl\n name: (identifier) @function.macro)\n\n(pcal_process\n name: (identifier) @function)\n\n(recursive_declaration\n (identifier) @function.macro)\n\n(recursive_declaration\n (operator_declaration\n name: (_) @function.macro))\n\n; Constants and variables\n(constant_declaration\n (identifier) @constant)\n\n(constant_declaration\n (operator_declaration\n name: (_) @constant))\n\n(pcal_var_decl\n (identifier) @variable)\n\n(pcal_with\n (identifier) @variable.parameter)\n\n(\".\"\n .\n (identifier) @attribute)\n\n(record_literal\n (identifier) @attribute)\n\n(set_of_records\n (identifier) @attribute)\n\n(variable_declaration\n (identifier) @variable)\n\n; Parameters\n(choose\n (identifier) @variable.parameter)\n\n(choose\n (tuple_of_identifiers\n (identifier) @variable.parameter))\n\n(lambda\n (identifier) @variable.parameter)\n\n(module_definition\n (operator_declaration\n name: (_) @variable.parameter))\n\n(module_definition\n parameter: (identifier) @variable.parameter)\n\n(operator_definition\n (operator_declaration\n name: (_) @variable.parameter))\n\n(operator_definition\n parameter: (identifier) @variable.parameter)\n\n(pcal_macro_decl\n parameter: (identifier) @variable.parameter)\n\n(pcal_proc_var_decl\n (identifier) @variable.parameter)\n\n(quantifier_bound\n (identifier) @variable.parameter)\n\n(quantifier_bound\n (tuple_of_identifiers\n (identifier) @variable.parameter))\n\n(unbounded_quantification\n (identifier) @variable.parameter)\n\n; Delimiters\n[\n (langle_bracket)\n (rangle_bracket)\n (rangle_bracket_sub)\n \"{\"\n \"}\"\n \"[\"\n \"]\"\n \"]_\"\n \"(\"\n \")\"\n] @punctuation.bracket\n\n[\n \",\"\n \":\"\n \".\"\n \"!\"\n \";\"\n (bullet_conj)\n (bullet_disj)\n (prev_func_val)\n (placeholder)\n] @punctuation.delimiter\n\n; Proofs\n(assume_prove\n (new\n (identifier) @variable.parameter))\n\n(assume_prove\n (new\n (operator_declaration\n name: (_) @variable.parameter)))\n\n(assumption\n name: (identifier) @constant)\n\n(pick_proof_step\n (identifier) @variable.parameter)\n\n(proof_step_id\n \"<\" @punctuation.bracket)\n\n(proof_step_id\n (level) @label)\n\n(proof_step_id\n (name) @label)\n\n(proof_step_id\n \">\" @punctuation.bracket)\n\n(proof_step_ref\n \"<\" @punctuation.bracket)\n\n(proof_step_ref\n (level) @label)\n\n(proof_step_ref\n (name) @label)\n\n(proof_step_ref\n \">\" @punctuation.bracket)\n\n(take_proof_step\n (identifier) @variable.parameter)\n\n(theorem\n name: (identifier) @constant)\n\n; Comments and tags\n(block_comment\n \"(*\" @comment)\n\n(block_comment\n \"*)\" @comment)\n\n(block_comment_text) @comment \n\n(comment) @comment \n\n(single_line) @comment\n\n(_\n label: (identifier) @label)\n\n(label\n name: (_) @label)\n\n(pcal_goto\n statement: (identifier) @label)",
|
|
21
|
+
"injections": "; This file is auto-generated. Do not edit.\n([\n (comment)\n (block_comment_text)\n] @injection.content\n (#set! injection.language \"comment\"))",
|
|
22
|
+
"locals": "; This file is auto-generated. Do not edit.\n; TLA+ scopes and definitions\n[\n (bounded_quantification)\n (choose)\n (function_definition)\n (function_literal)\n (lambda)\n (let_in)\n (module)\n (module_definition)\n (operator_definition)\n (set_filter)\n (set_map)\n (unbounded_quantification)\n] @local.scope\n\n(choose\n (identifier) @local.definition.parameter)\n\n(choose\n (tuple_of_identifiers\n (identifier) @local.definition.parameter))\n\n(constant_declaration\n (identifier) @local.definition.constant)\n\n(constant_declaration\n (operator_declaration\n name: (_) @local.definition.constant))\n\n(function_definition\n name: (identifier) @local.definition.function\n (#set! definition.function.scope \"parent\"))\n\n(lambda\n (identifier) @local.definition.parameter)\n\n(module_definition\n name: (_) @local.definition.import\n (#set! definition.import.scope \"parent\"))\n\n(module_definition\n parameter: (identifier) @local.definition.parameter)\n\n(module_definition\n parameter: (operator_declaration\n name: (_) @local.definition.parameter))\n\n(operator_definition\n name: (_) @local.definition.macro\n (#set! definition.macro.scope \"parent\"))\n\n(operator_definition\n parameter: (identifier) @local.definition.parameter)\n\n(operator_definition\n parameter: (operator_declaration\n name: (_) @local.definition.parameter))\n\n(quantifier_bound\n (identifier) @local.definition.parameter)\n\n(quantifier_bound\n (tuple_of_identifiers\n (identifier) @local.definition.parameter))\n\n(unbounded_quantification\n (identifier) @local.definition.parameter)\n\n(variable_declaration\n (identifier) @local.definition.var)\n\n; Proof scopes and definitions\n[\n (non_terminal_proof)\n (suffices_proof_step)\n (theorem)\n] @local.scope\n\n(assume_prove\n (new\n (identifier) @local.definition.parameter))\n\n(assume_prove\n (new\n (operator_declaration\n name: (_) @local.definition.parameter)))\n\n(assumption\n name: (identifier) @local.definition.constant)\n\n(pick_proof_step\n (identifier) @local.definition.parameter)\n\n(take_proof_step\n (identifier) @local.definition.parameter)\n\n(theorem\n name: (identifier) @local.definition.constant\n (#set! definition.constant.scope \"parent\"))\n\n; PlusCal scopes and definitions\n[\n (pcal_algorithm)\n (pcal_macro)\n (pcal_procedure)\n (pcal_with)\n] @local.scope\n\n(pcal_macro_decl\n parameter: (identifier) @local.definition.parameter)\n\n(pcal_proc_var_decl\n (identifier) @local.definition.parameter)\n\n(pcal_var_decl\n (identifier) @local.definition.var)\n\n(pcal_with\n (identifier) @local.definition.parameter)\n\n; Built-in PlusCal variables\n(pcal_algorithm_body\n [\n (_\n (identifier_ref) @local.definition.var)\n (_\n (_\n (identifier_ref) @local.definition.var))\n (_\n (_\n (_\n (identifier_ref) @local.definition.var)))\n (_\n (_\n (_\n (_\n (identifier_ref) @local.definition.var))))\n (_\n (_\n (_\n (_\n (_\n (identifier_ref) @local.definition.var)))))\n ]\n (#any-of? @local.definition.var \"self\" \"pc\" \"stack\"))\n\n; References\n(identifier_ref) @local.reference\n\n(prefix_op_symbol) @local.reference\n\n(bound_prefix_op\n symbol: (_) @local.reference)\n\n(infix_op_symbol) @local.reference\n\n(bound_infix_op\n symbol: (_) @local.reference)\n\n(postfix_op_symbol) @local.reference\n\n(bound_postfix_op\n symbol: (_) @local.reference)\n\n(bound_nonfix_op\n symbol: (_) @local.reference)",
|
|
23
|
+
"brackets": "; This file is auto-generated. Do not edit.\n(\"(\" @open\n \")\" @close)\n\n(\"[\" @open\n \"]\" @close)\n\n(\"{\" @open\n \"}\" @close)\n"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/lumis.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packageName": "@lumis-sh/wasm-tlaplus",
|
|
3
|
+
"version": "0.26.1",
|
|
4
|
+
"definitionHash": "d004df76e24087f92340eb9c857454d64bf7759511741d5e7a6b5bc84d9fe23b",
|
|
5
|
+
"parser": {
|
|
6
|
+
"name": "tree-sitter-tlaplus",
|
|
7
|
+
"grammarName": "tlaplus",
|
|
8
|
+
"upstreamVersion": "0.0.0",
|
|
9
|
+
"revision": "add40814fda369f6efd989977b2c498aaddde984",
|
|
10
|
+
"sha256": "798ef6befd5a9b6435eace5ef1e04559b5bb054cc5e9a233e02e4bc3fd99db2f",
|
|
11
|
+
"size": 4927432
|
|
12
|
+
},
|
|
13
|
+
"languages": {
|
|
14
|
+
"tlaplus": {
|
|
15
|
+
"aliases": [
|
|
16
|
+
"tla",
|
|
17
|
+
"tla+",
|
|
18
|
+
"pluscal"
|
|
19
|
+
],
|
|
20
|
+
"highlights": "; This file is auto-generated. Do not edit.\n; Keywords\n[\n \"ACTION\"\n \"ASSUME\"\n \"ASSUMPTION\"\n \"AXIOM\"\n \"BY\"\n \"CASE\"\n \"CHOOSE\"\n \"CONSTANT\"\n \"CONSTANTS\"\n \"COROLLARY\"\n \"DEF\"\n \"DEFINE\"\n \"DEFS\"\n \"ELSE\"\n \"EXCEPT\"\n \"EXTENDS\"\n \"HAVE\"\n \"HIDE\"\n \"IF\"\n \"IN\"\n \"INSTANCE\"\n \"LAMBDA\"\n \"LEMMA\"\n \"LET\"\n \"LOCAL\"\n \"MODULE\"\n \"NEW\"\n \"OBVIOUS\"\n \"OMITTED\"\n \"ONLY\"\n \"OTHER\"\n \"PICK\"\n \"PROOF\"\n \"PROPOSITION\"\n \"PROVE\"\n \"QED\"\n \"RECURSIVE\"\n \"SF_\"\n \"STATE\"\n \"SUFFICES\"\n \"TAKE\"\n \"TEMPORAL\"\n \"THEN\"\n \"THEOREM\"\n \"USE\"\n \"VARIABLE\"\n \"VARIABLES\"\n \"WF_\"\n \"WITH\"\n \"WITNESS\"\n (address)\n (all_map_to)\n (assign)\n (case_arrow)\n (case_box)\n (def_eq)\n (exists)\n (forall)\n (gets)\n (label_as)\n (maps_to)\n (set_in)\n (temporal_exists)\n (temporal_forall)\n] @keyword\n\n; Pluscal keywords\n[\n (pcal_algorithm_start)\n \"algorithm\"\n \"assert\"\n \"begin\"\n \"call\"\n \"define\"\n \"end\"\n \"fair\"\n \"goto\"\n \"macro\"\n \"or\"\n \"procedure\"\n \"process\"\n (pcal_skip)\n \"variable\"\n \"variables\"\n \"when\"\n \"with\"\n] @keyword\n\n\"await\" @keyword.coroutine\n\n(pcal_with\n \"=\" @keyword)\n\n(pcal_process\n \"=\" @keyword)\n\n[\n \"if\"\n \"then\"\n \"else\"\n \"elsif\"\n (pcal_end_if)\n \"either\"\n (pcal_end_either)\n] @keyword.conditional\n\n[\n \"while\"\n \"do\"\n (pcal_end_while)\n \"with\"\n (pcal_end_with)\n] @keyword.repeat\n\n(pcal_return) @keyword.return\n\n\"print\" @function.macro\n\n; Literals\n(binary_number\n (format) @keyword)\n\n(binary_number\n (value) @number)\n\n(boolean) @boolean\n\n(boolean_set) @type\n\n(hex_number\n (format) @keyword)\n\n(hex_number\n (value) @number)\n\n(int_number_set) @type\n\n(nat_number) @number\n\n(nat_number_set) @type\n\n(octal_number\n (format) @keyword)\n\n(octal_number\n (value) @number)\n\n(real_number) @number\n\n(real_number_set) @type\n\n(string) @string\n\n(escape_char) @string.escape\n\n(string_set) @type\n\n; Namespaces\n(extends\n (identifier_ref) @module)\n\n(instance\n (identifier_ref) @module)\n\n(module\n name: (identifier) @module)\n\n(pcal_algorithm\n name: (identifier) @module)\n\n; Operators, functions, and macros\n(bound_infix_op\n symbol: (_) @operator)\n\n(bound_nonfix_op\n symbol: (_) @operator)\n\n(bound_postfix_op\n symbol: (_) @operator)\n\n(bound_prefix_op\n symbol: (_) @operator)\n\n(prefix_op_symbol) @operator\n\n(infix_op_symbol) @operator\n\n(postfix_op_symbol) @operator\n\n(function_definition\n name: (identifier) @function)\n\n(module_definition\n name: (_) @keyword.import)\n\n(operator_definition\n name: (_) @function.macro)\n\n(pcal_macro_decl\n name: (identifier) @function.macro)\n\n(pcal_macro_call\n name: (identifier) @function.macro)\n\n(pcal_proc_decl\n name: (identifier) @function.macro)\n\n(pcal_process\n name: (identifier) @function)\n\n(recursive_declaration\n (identifier) @function.macro)\n\n(recursive_declaration\n (operator_declaration\n name: (_) @function.macro))\n\n; Constants and variables\n(constant_declaration\n (identifier) @constant)\n\n(constant_declaration\n (operator_declaration\n name: (_) @constant))\n\n(pcal_var_decl\n (identifier) @variable)\n\n(pcal_with\n (identifier) @variable.parameter)\n\n(\".\"\n .\n (identifier) @attribute)\n\n(record_literal\n (identifier) @attribute)\n\n(set_of_records\n (identifier) @attribute)\n\n(variable_declaration\n (identifier) @variable)\n\n; Parameters\n(choose\n (identifier) @variable.parameter)\n\n(choose\n (tuple_of_identifiers\n (identifier) @variable.parameter))\n\n(lambda\n (identifier) @variable.parameter)\n\n(module_definition\n (operator_declaration\n name: (_) @variable.parameter))\n\n(module_definition\n parameter: (identifier) @variable.parameter)\n\n(operator_definition\n (operator_declaration\n name: (_) @variable.parameter))\n\n(operator_definition\n parameter: (identifier) @variable.parameter)\n\n(pcal_macro_decl\n parameter: (identifier) @variable.parameter)\n\n(pcal_proc_var_decl\n (identifier) @variable.parameter)\n\n(quantifier_bound\n (identifier) @variable.parameter)\n\n(quantifier_bound\n (tuple_of_identifiers\n (identifier) @variable.parameter))\n\n(unbounded_quantification\n (identifier) @variable.parameter)\n\n; Delimiters\n[\n (langle_bracket)\n (rangle_bracket)\n (rangle_bracket_sub)\n \"{\"\n \"}\"\n \"[\"\n \"]\"\n \"]_\"\n \"(\"\n \")\"\n] @punctuation.bracket\n\n[\n \",\"\n \":\"\n \".\"\n \"!\"\n \";\"\n (bullet_conj)\n (bullet_disj)\n (prev_func_val)\n (placeholder)\n] @punctuation.delimiter\n\n; Proofs\n(assume_prove\n (new\n (identifier) @variable.parameter))\n\n(assume_prove\n (new\n (operator_declaration\n name: (_) @variable.parameter)))\n\n(assumption\n name: (identifier) @constant)\n\n(pick_proof_step\n (identifier) @variable.parameter)\n\n(proof_step_id\n \"<\" @punctuation.bracket)\n\n(proof_step_id\n (level) @label)\n\n(proof_step_id\n (name) @label)\n\n(proof_step_id\n \">\" @punctuation.bracket)\n\n(proof_step_ref\n \"<\" @punctuation.bracket)\n\n(proof_step_ref\n (level) @label)\n\n(proof_step_ref\n (name) @label)\n\n(proof_step_ref\n \">\" @punctuation.bracket)\n\n(take_proof_step\n (identifier) @variable.parameter)\n\n(theorem\n name: (identifier) @constant)\n\n; Comments and tags\n(block_comment\n \"(*\" @comment)\n\n(block_comment\n \"*)\" @comment)\n\n(block_comment_text) @comment \n\n(comment) @comment \n\n(single_line) @comment\n\n(_\n label: (identifier) @label)\n\n(label\n name: (_) @label)\n\n(pcal_goto\n statement: (identifier) @label)",
|
|
21
|
+
"injections": "; This file is auto-generated. Do not edit.\n([\n (comment)\n (block_comment_text)\n] @injection.content\n (#set! injection.language \"comment\"))",
|
|
22
|
+
"locals": "; This file is auto-generated. Do not edit.\n; TLA+ scopes and definitions\n[\n (bounded_quantification)\n (choose)\n (function_definition)\n (function_literal)\n (lambda)\n (let_in)\n (module)\n (module_definition)\n (operator_definition)\n (set_filter)\n (set_map)\n (unbounded_quantification)\n] @local.scope\n\n(choose\n (identifier) @local.definition.parameter)\n\n(choose\n (tuple_of_identifiers\n (identifier) @local.definition.parameter))\n\n(constant_declaration\n (identifier) @local.definition.constant)\n\n(constant_declaration\n (operator_declaration\n name: (_) @local.definition.constant))\n\n(function_definition\n name: (identifier) @local.definition.function\n (#set! definition.function.scope \"parent\"))\n\n(lambda\n (identifier) @local.definition.parameter)\n\n(module_definition\n name: (_) @local.definition.import\n (#set! definition.import.scope \"parent\"))\n\n(module_definition\n parameter: (identifier) @local.definition.parameter)\n\n(module_definition\n parameter: (operator_declaration\n name: (_) @local.definition.parameter))\n\n(operator_definition\n name: (_) @local.definition.macro\n (#set! definition.macro.scope \"parent\"))\n\n(operator_definition\n parameter: (identifier) @local.definition.parameter)\n\n(operator_definition\n parameter: (operator_declaration\n name: (_) @local.definition.parameter))\n\n(quantifier_bound\n (identifier) @local.definition.parameter)\n\n(quantifier_bound\n (tuple_of_identifiers\n (identifier) @local.definition.parameter))\n\n(unbounded_quantification\n (identifier) @local.definition.parameter)\n\n(variable_declaration\n (identifier) @local.definition.var)\n\n; Proof scopes and definitions\n[\n (non_terminal_proof)\n (suffices_proof_step)\n (theorem)\n] @local.scope\n\n(assume_prove\n (new\n (identifier) @local.definition.parameter))\n\n(assume_prove\n (new\n (operator_declaration\n name: (_) @local.definition.parameter)))\n\n(assumption\n name: (identifier) @local.definition.constant)\n\n(pick_proof_step\n (identifier) @local.definition.parameter)\n\n(take_proof_step\n (identifier) @local.definition.parameter)\n\n(theorem\n name: (identifier) @local.definition.constant\n (#set! definition.constant.scope \"parent\"))\n\n; PlusCal scopes and definitions\n[\n (pcal_algorithm)\n (pcal_macro)\n (pcal_procedure)\n (pcal_with)\n] @local.scope\n\n(pcal_macro_decl\n parameter: (identifier) @local.definition.parameter)\n\n(pcal_proc_var_decl\n (identifier) @local.definition.parameter)\n\n(pcal_var_decl\n (identifier) @local.definition.var)\n\n(pcal_with\n (identifier) @local.definition.parameter)\n\n; Built-in PlusCal variables\n(pcal_algorithm_body\n [\n (_\n (identifier_ref) @local.definition.var)\n (_\n (_\n (identifier_ref) @local.definition.var))\n (_\n (_\n (_\n (identifier_ref) @local.definition.var)))\n (_\n (_\n (_\n (_\n (identifier_ref) @local.definition.var))))\n (_\n (_\n (_\n (_\n (_\n (identifier_ref) @local.definition.var)))))\n ]\n (#any-of? @local.definition.var \"self\" \"pc\" \"stack\"))\n\n; References\n(identifier_ref) @local.reference\n\n(prefix_op_symbol) @local.reference\n\n(bound_prefix_op\n symbol: (_) @local.reference)\n\n(infix_op_symbol) @local.reference\n\n(bound_infix_op\n symbol: (_) @local.reference)\n\n(postfix_op_symbol) @local.reference\n\n(bound_postfix_op\n symbol: (_) @local.reference)\n\n(bound_nonfix_op\n symbol: (_) @local.reference)",
|
|
23
|
+
"brackets": "; This file is auto-generated. Do not edit.\n(\"(\" @open\n \")\" @close)\n\n(\"[\" @open\n \"]\" @close)\n\n(\"{\" @open\n \"}\" @close)\n"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumis-sh/wasm-tlaplus",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.26.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"description": "Tree-sitter parser and queries for tlaplus, 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-tlaplus.wasm": "./tree-sitter-tlaplus.wasm",
|
|
22
|
+
"./lumis.json": "./lumis.json"
|
|
23
|
+
},
|
|
24
|
+
"lumis": {
|
|
25
|
+
"treeSitter": "0.26",
|
|
26
|
+
"formatVersion": 5,
|
|
27
|
+
"definitionHash": "d004df76e24087f92340eb9c857454d64bf7759511741d5e7a6b5bc84d9fe23b"
|
|
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
|