@manifest-configuration-language/language 0.3.11 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +3 -2
- package/reference/stdlib-functions.md +1 -1
- package/src/mcl.tmLanguage.json +5 -5
package/README.md
CHANGED
|
@@ -13,6 +13,6 @@ const support = mclLanguageSupport();
|
|
|
13
13
|
|
|
14
14
|
The Lezer parser provides incremental syntax trees and CodeMirror highlighting for declarations, generic and schema-backed types, expressions, indentation-sensitive map/list blocks, block-level `if`/`else` and `for` expressions, dynamic `key(...)` map keys, node declarations, `with`/`without` overlays, typed functions, and validation rules. Descendant validation supports a type selector, `where = fn(...) => ...`, and `select = bySchema(Type)`; each selector may include the optional integer `minMatches` argument. The grammar recognizes source structure and does not validate evaluation semantics.
|
|
15
15
|
|
|
16
|
-
`npm run check:parity` checks that TextMate and
|
|
16
|
+
`npm run check:parity` checks that the generated TextMate keyword and operator patterns match the Lezer grammar, tokenizes representative MCL constructs with the VS Code TextMate tokenizer and checks their scopes, parses package-owned fixtures and every `.mcl` example under `cmd/mcl-wasm/testdata/examples` with both Lezer and the Go formatter, and verifies one malformed declaration is rejected by both parsers. The tokenization check covers comments, strings, keywords, identifiers, function calls, and operators. The fixtures cover descendant selector variants, dynamic map keys, schema-backed types, qualified rule references, nested application manifests, and final `if`/`else` expressions. The parity check uses the Go CLI as the syntax reference. Run `pnpm run generate:textmate` after changing Lezer keyword or operator declarations; `src/mcl.tmLanguage.json` is committed generated output.
|
|
17
17
|
|
|
18
18
|
Build generation runs during `prepack` with the pinned `@lezer/generator` dependency. CodeMirror packages, including `@codemirror/autocomplete` for bracket completion, are peers so applications can share their existing editor runtime. The parity check also constructs the support in a Node `EditorState` to catch package integration errors.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manifest-configuration-language/language",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "MCL TextMate grammar and CodeMirror language support.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "lezer-generator src/mcl.grammar -o src/parser.js",
|
|
44
|
-
"
|
|
44
|
+
"generate:textmate": "node scripts/generate-textmate.mjs",
|
|
45
|
+
"check:parity": "pnpm run build && node scripts/generate-textmate.mjs --check && node scripts/check-parity.mjs && node scripts/check-textmate.mjs && node scripts/smoke-language-support.mjs"
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Standard library function reference
|
|
2
2
|
|
|
3
|
-
MCL version: `0.3.
|
|
3
|
+
MCL version: `0.3.12`
|
|
4
4
|
|
|
5
5
|
Function names, modules, and parameter names are generated from the standard-library registry. Function behavior and type semantics are documented in the hand-written language reference.
|
|
6
6
|
|
package/src/mcl.tmLanguage.json
CHANGED
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"patterns": [
|
|
87
87
|
{
|
|
88
88
|
"name": "keyword.control.mcl",
|
|
89
|
-
"match": "\\b(?:
|
|
89
|
+
"match": "\\b(?:as|bySchema|descendants|each|else|emit|export|fn|for|if|import|key|let|message|minMatches|node|require|requireDescendants|requireEach|rule|schema|select|type|using|validate|where|with|without)\\b"
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"name": "keyword.operator.mcl",
|
|
93
|
-
"match": "\\b(?:and|
|
|
93
|
+
"match": "\\b(?:and|in|not|or)\\b"
|
|
94
94
|
}
|
|
95
95
|
]
|
|
96
96
|
},
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"patterns": [
|
|
99
99
|
{
|
|
100
100
|
"name": "constant.language.mcl",
|
|
101
|
-
"match": "\\b(?:
|
|
101
|
+
"match": "\\b(?:false|null|output|true)\\b"
|
|
102
102
|
}
|
|
103
103
|
]
|
|
104
104
|
},
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"patterns": [
|
|
107
107
|
{
|
|
108
108
|
"name": "storage.type.mcl",
|
|
109
|
-
"match": "\\b(?:Any|
|
|
109
|
+
"match": "\\b(?:Any|Bool|Decimal|Function|Int|List|Map|Node|Null|Schema|String)\\b"
|
|
110
110
|
}
|
|
111
111
|
]
|
|
112
112
|
},
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"patterns": [
|
|
139
139
|
{
|
|
140
140
|
"name": "keyword.operator.mcl",
|
|
141
|
-
"match": "(
|
|
141
|
+
"match": "(?:->|!=|\\?\\?|<=|==|=>|>=|-|\\*|/|%|\\+|<|=|>|\\|)"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
},
|