@bablr/language-en-cstml-json 0.3.0 → 0.4.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/lib/grammar.js +4 -3
- package/lib/grammar.macro.js +4 -2
- package/package.json +8 -8
package/lib/grammar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @macrome
|
|
2
2
|
* @generatedby @bablr/macrome-generator-bablr
|
|
3
|
-
* @generatedfrom ./grammar.macro.js#
|
|
3
|
+
* @generatedfrom ./grammar.macro.js#a9659e5fbbb99478498fa677705cdb98fb38dd6c
|
|
4
4
|
* This file is autogenerated. Please do not edit it directly.
|
|
5
5
|
* When editing run `npx macrome watch` then change the file this is generated from.
|
|
6
6
|
*/
|
|
@@ -17,9 +17,10 @@ export const canonicalURL = 'https://bablr.org/languages/core/en/cstml-json';
|
|
|
17
17
|
export const {
|
|
18
18
|
dependencies
|
|
19
19
|
} = JSON;
|
|
20
|
+
export const defaultMatcher = m`<_Expression />`;
|
|
20
21
|
export const grammar = basicTriviaEnhancer({
|
|
21
22
|
triviaIsAllowed: s => s.span === 'Bare',
|
|
22
|
-
triviaMatcher: m`#: :Space:
|
|
23
|
+
triviaMatcher: m`#: :Space: <__Blank /[ \n\r\t]/ />`
|
|
23
24
|
}, class CSTMLJSONGrammar extends (_JSON$grammar = JSON.grammar) {
|
|
24
25
|
static {
|
|
25
26
|
[_initProto] = _applyDecs(this, [[_StringDecs, 2, "String"], [Node, 2, "Property"], [Node, 2, "Identifier"], [Node, 2, "IdentifierContent"], [_NotANumberDecs, 2, "NotANumber"], [_UndefinedDecs, 2, "Undefined"], [Node, 2, "EscapeSequence"], [_InfinityDecs, 2, "Infinity"]], [], 0, void 0, _JSON$grammar).e;
|
|
@@ -54,7 +55,7 @@ export const grammar = basicTriviaEnhancer({
|
|
|
54
55
|
yield eatMatch(m`key$: <Identifier />`);
|
|
55
56
|
}
|
|
56
57
|
yield eat(m`sigilToken: <*Punctuator ':' />`);
|
|
57
|
-
yield eat(m`value+$: <
|
|
58
|
+
yield eat(m`value+$: <_Expression />`);
|
|
58
59
|
}
|
|
59
60
|
*Identifier({
|
|
60
61
|
ctx
|
package/lib/grammar.macro.js
CHANGED
|
@@ -9,10 +9,12 @@ export const canonicalURL = 'https://bablr.org/languages/core/en/cstml-json';
|
|
|
9
9
|
|
|
10
10
|
export const { dependencies } = JSON;
|
|
11
11
|
|
|
12
|
+
export const defaultMatcher = m`<_Expression />`;
|
|
13
|
+
|
|
12
14
|
export const grammar = basicTriviaEnhancer(
|
|
13
15
|
{
|
|
14
16
|
triviaIsAllowed: (s) => s.span === 'Bare',
|
|
15
|
-
triviaMatcher: m`#: :Space:
|
|
17
|
+
triviaMatcher: m`#: :Space: <__Blank /[ \n\r\t]/ />`,
|
|
16
18
|
},
|
|
17
19
|
|
|
18
20
|
class CSTMLJSONGrammar extends JSON.grammar {
|
|
@@ -55,7 +57,7 @@ export const grammar = basicTriviaEnhancer(
|
|
|
55
57
|
yield eatMatch(m`key$: <Identifier />`);
|
|
56
58
|
}
|
|
57
59
|
yield eat(m`sigilToken: <*Punctuator ':' />`);
|
|
58
|
-
yield eat(m`value+$: <
|
|
60
|
+
yield eat(m`value+$: <_Expression />`);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
@Node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bablr/language-en-cstml-json",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A BABLR language for CSTML-style JSON",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12.0.0"
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"test": "mocha"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/runtime": "
|
|
25
|
-
"@bablr/agast-helpers": "0.
|
|
26
|
-
"@bablr/agast-vm-helpers": "0.
|
|
27
|
-
"@bablr/boot": "0.
|
|
28
|
-
"@bablr/helpers": "0.
|
|
29
|
-
"@bablr/language-en-json": "0.
|
|
24
|
+
"@babel/runtime": "7.28.2",
|
|
25
|
+
"@bablr/agast-helpers": "0.9.0",
|
|
26
|
+
"@bablr/agast-vm-helpers": "0.9.0",
|
|
27
|
+
"@bablr/boot": "0.10.0",
|
|
28
|
+
"@bablr/helpers": "0.24.0",
|
|
29
|
+
"@bablr/language-en-json": "0.12.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"bablr": "^0.
|
|
32
|
+
"bablr": "^0.10.0",
|
|
33
33
|
"@bablr/macrome": "^0.1.3",
|
|
34
34
|
"@bablr/macrome-generator-bablr": "^0.3.2",
|
|
35
35
|
"@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#49f5952efed27f94ee9b94340eb1563c440bf64e",
|