@bablr/language-en-bablr-vm-instruction 0.8.0 → 0.9.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 +8 -8
- package/lib/grammar.macro.js +13 -12
- package/package.json +11 -11
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#d59a1c2024ebd27e109c529425646b0eb4863552
|
|
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
|
*/
|
|
@@ -19,7 +19,7 @@ import { buildString } from '@bablr/helpers/builders';
|
|
|
19
19
|
export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-instruction';
|
|
20
20
|
export function* eatMatchTrivia() {
|
|
21
21
|
if (yield match(re`/[ \t\n]/`)) {
|
|
22
|
-
return yield eat(m`#:
|
|
22
|
+
return yield eat(m`#: :Space: <*Space />`);
|
|
23
23
|
}
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
@@ -31,7 +31,7 @@ const IJSON = extendLanguage(JSON, {
|
|
|
31
31
|
grammar: class IJSON extends JSON.grammar {
|
|
32
32
|
*Expression(props) {
|
|
33
33
|
if (yield match(re`/(m|re|t|i)['"\u0060]/`)) {
|
|
34
|
-
yield eat(m
|
|
34
|
+
yield eat(m`:Instruction: <_Expression />`);
|
|
35
35
|
} else {
|
|
36
36
|
yield* super.Expression(props);
|
|
37
37
|
}
|
|
@@ -69,7 +69,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
69
69
|
yield eat(m`closeToken: <*Punctuator ')' { balancer: true } />`);
|
|
70
70
|
}
|
|
71
71
|
*Expression() {
|
|
72
|
-
yield eat(m`<_Any />`, [m
|
|
72
|
+
yield eat(m`<_Any />`, [m`:IJSON: <Array '[' />`, m`:IJSON: <Object '{' />`, m`:JSON: <Boolean /true|false/ />`, m`:JSON: <Null 'null' />`, m`:JSON: <Number /[\d]/ />`, m`:JSON: <Infinity /[+-]?Infinity/ />`, m`<SpamexString /m["'\u0060]/ />`, m`<CSTMLString /t["'\u0060]/ />`, m`<RegexString /re["'\u0060]/ />`, m`<InstructionString /i["'\u0060]/ />`, m`:JSON: <String /["']/ />`]);
|
|
73
73
|
}
|
|
74
74
|
*SpamexString({
|
|
75
75
|
ctx
|
|
@@ -77,7 +77,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
77
77
|
yield eat(m`sigilToken: <*Keyword 'm' />`);
|
|
78
78
|
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
79
79
|
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
80
|
-
yield eat(m`content:
|
|
80
|
+
yield eat(m`content: :Spamex: <__Matcher />`);
|
|
81
81
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
82
82
|
}
|
|
83
83
|
*CSTMLString({
|
|
@@ -86,7 +86,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
86
86
|
yield eat(m`sigilToken: <*Keyword 't' />`);
|
|
87
87
|
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
88
88
|
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
89
|
-
yield eat(m`content:
|
|
89
|
+
yield eat(m`content: :CSTML: <__Tag />`);
|
|
90
90
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
91
91
|
}
|
|
92
92
|
*RegexString({
|
|
@@ -95,7 +95,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
95
95
|
yield eat(m`sigilToken: <*Keyword 're' />`);
|
|
96
96
|
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
97
97
|
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
98
|
-
yield eat(m`content:
|
|
98
|
+
yield eat(m`content: :Regex: <Pattern />`);
|
|
99
99
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
100
100
|
}
|
|
101
101
|
*InstructionString({
|
|
@@ -108,7 +108,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
108
108
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
109
109
|
}
|
|
110
110
|
*String() {
|
|
111
|
-
yield eat(m
|
|
111
|
+
yield eat(m`:IJSON: <_String />`);
|
|
112
112
|
}
|
|
113
113
|
*Identifier() {
|
|
114
114
|
yield eat(re`/[a-zA-Z]+/`);
|
package/lib/grammar.macro.js
CHANGED
|
@@ -13,7 +13,7 @@ export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-instru
|
|
|
13
13
|
|
|
14
14
|
export function* eatMatchTrivia() {
|
|
15
15
|
if (yield match(re`/[ \t\n]/`)) {
|
|
16
|
-
return yield eat(m`#:
|
|
16
|
+
return yield eat(m`#: :Space: <*Space />`);
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
@@ -26,7 +26,7 @@ const IJSON = extendLanguage(JSON, {
|
|
|
26
26
|
grammar: class IJSON extends JSON.grammar {
|
|
27
27
|
*Expression(props) {
|
|
28
28
|
if (yield match(re`/(m|re|t|i)['"\u0060]/`)) {
|
|
29
|
-
yield eat(m
|
|
29
|
+
yield eat(m`:Instruction: <_Expression />`);
|
|
30
30
|
} else {
|
|
31
31
|
yield* super.Expression(props);
|
|
32
32
|
}
|
|
@@ -57,16 +57,17 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
57
57
|
|
|
58
58
|
*Expression() {
|
|
59
59
|
yield eat(m`<_Any />`, [
|
|
60
|
-
m
|
|
61
|
-
m
|
|
62
|
-
m
|
|
63
|
-
m
|
|
64
|
-
m
|
|
60
|
+
m`:IJSON: <Array '[' />`,
|
|
61
|
+
m`:IJSON: <Object '{' />`,
|
|
62
|
+
m`:JSON: <Boolean /true|false/ />`,
|
|
63
|
+
m`:JSON: <Null 'null' />`,
|
|
64
|
+
m`:JSON: <Number /[\d]/ />`,
|
|
65
|
+
m`:JSON: <Infinity /[+-]?Infinity/ />`,
|
|
65
66
|
m`<SpamexString /m["'\u0060]/ />`,
|
|
66
67
|
m`<CSTMLString /t["'\u0060]/ />`,
|
|
67
68
|
m`<RegexString /re["'\u0060]/ />`,
|
|
68
69
|
m`<InstructionString /i["'\u0060]/ />`,
|
|
69
|
-
m
|
|
70
|
+
m`:JSON: <String /["']/ />`,
|
|
70
71
|
]);
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -75,7 +76,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
75
76
|
yield eat(m`sigilToken: <*Keyword 'm' />`);
|
|
76
77
|
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
77
78
|
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
78
|
-
yield eat(m`content:
|
|
79
|
+
yield eat(m`content: :Spamex: <__Matcher />`);
|
|
79
80
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
80
81
|
}
|
|
81
82
|
|
|
@@ -84,7 +85,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
84
85
|
yield eat(m`sigilToken: <*Keyword 't' />`);
|
|
85
86
|
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
86
87
|
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
87
|
-
yield eat(m`content:
|
|
88
|
+
yield eat(m`content: :CSTML: <__Tag />`);
|
|
88
89
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -93,7 +94,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
93
94
|
yield eat(m`sigilToken: <*Keyword 're' />`);
|
|
94
95
|
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
95
96
|
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
96
|
-
yield eat(m`content:
|
|
97
|
+
yield eat(m`content: :Regex: <Pattern />`);
|
|
97
98
|
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
98
99
|
}
|
|
99
100
|
|
|
@@ -110,7 +111,7 @@ export const grammar = class BABLRVMInstructionGrammar {
|
|
|
110
111
|
@CoveredBy('Expression')
|
|
111
112
|
@Node
|
|
112
113
|
*String() {
|
|
113
|
-
yield eat(m
|
|
114
|
+
yield eat(m`:IJSON: <_String />`);
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
@Node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bablr/language-en-bablr-vm-instruction",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A BABLR language for BABLR VM instructions",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12.0.0"
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "^7.23.2",
|
|
26
|
-
"@bablr/agast-helpers": "0.
|
|
27
|
-
"@bablr/agast-vm-helpers": "0.
|
|
28
|
-
"@bablr/boot": "0.
|
|
29
|
-
"@bablr/helpers": "0.
|
|
30
|
-
"@bablr/language-en-blank-space": "0.
|
|
31
|
-
"@bablr/language-en-cstml": "0.
|
|
32
|
-
"@bablr/language-en-regex-vm-pattern": "0.
|
|
33
|
-
"@bablr/language-en-spamex": "0.
|
|
34
|
-
"@bablr/language-en-cstml-json": "0.
|
|
26
|
+
"@bablr/agast-helpers": "0.8.0",
|
|
27
|
+
"@bablr/agast-vm-helpers": "0.8.0",
|
|
28
|
+
"@bablr/boot": "0.9.0",
|
|
29
|
+
"@bablr/helpers": "0.23.0",
|
|
30
|
+
"@bablr/language-en-blank-space": "0.8.0",
|
|
31
|
+
"@bablr/language-en-cstml": "0.10.0",
|
|
32
|
+
"@bablr/language-en-regex-vm-pattern": "0.10.0",
|
|
33
|
+
"@bablr/language-en-spamex": "0.9.0",
|
|
34
|
+
"@bablr/language-en-cstml-json": "0.3.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#
|
|
37
|
+
"@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#c97bfa4b3663f8378e9b3e42bb5a41e685406cf9",
|
|
38
38
|
"@bablr/macrome": "^0.1.3",
|
|
39
39
|
"@bablr/macrome-generator-bablr": "^0.3.2",
|
|
40
40
|
"enhanced-resolve": "^5.12.0",
|