@bablr/language-en-bablr-vm-instruction 0.6.1 → 0.8.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 +86 -1052
- package/lib/grammar.macro.js +77 -97
- package/package.json +10 -8
- package/lib/cstml.grammar.js +0 -44
- package/lib/cstml.grammar.macro.js +0 -17
- package/lib/spamex.grammar.js +0 -57
- package/lib/spamex.grammar.macro.js +0 -17
package/lib/grammar.macro.js
CHANGED
|
@@ -1,141 +1,121 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { re, spam as m } from '@bablr/boot';
|
|
2
|
+
import { extendLanguage, o, eat, match, eatMatch } from '@bablr/helpers/grammar';
|
|
2
3
|
import { CoveredBy, Node, InjectFrom } from '@bablr/helpers/decorators';
|
|
3
4
|
import * as Space from '@bablr/language-en-blank-space';
|
|
5
|
+
import * as CSTML from '@bablr/language-en-cstml';
|
|
6
|
+
import * as Spamex from '@bablr/language-en-spamex';
|
|
7
|
+
import * as Regex from '@bablr/language-en-regex-vm-pattern';
|
|
8
|
+
import * as JSON from '@bablr/language-en-cstml-json';
|
|
4
9
|
import * as productions from '@bablr/helpers/productions';
|
|
10
|
+
import { buildString } from '@bablr/helpers/builders';
|
|
5
11
|
|
|
6
12
|
export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-instruction';
|
|
7
13
|
|
|
8
|
-
export const dependencies = { Space };
|
|
9
|
-
|
|
10
14
|
export function* eatMatchTrivia() {
|
|
11
|
-
if (yield
|
|
12
|
-
return yield
|
|
15
|
+
if (yield match(re`/[ \t\n]/`)) {
|
|
16
|
+
return yield eat(m`#: <*Space:Space />`);
|
|
13
17
|
}
|
|
14
18
|
return null;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<Tuple '(' />
|
|
30
|
-
<*Boolean /true|false/ />
|
|
31
|
-
<*Null 'null' />
|
|
32
|
-
<*Identifier /[a-zA-Z]+/ />
|
|
33
|
-
<Number /[\d]|[+-]?Infinity/ />
|
|
34
|
-
])`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@CoveredBy('Expression')
|
|
38
|
-
@Node
|
|
39
|
-
*Array() {
|
|
40
|
-
yield i`eat(<*Punctuator '[' balanced=']' /> 'openToken')`;
|
|
41
|
-
let sp = yield* eatMatchTrivia();
|
|
42
|
-
let first = true;
|
|
43
|
-
while ((first || sp) && (yield i`match(/./y)`)) {
|
|
44
|
-
yield i`eat(<Expression /> 'elements[]$')`;
|
|
45
|
-
sp = yield* eatMatchTrivia();
|
|
46
|
-
first = false;
|
|
21
|
+
const IJSON = extendLanguage(JSON, {
|
|
22
|
+
canonicalURL: 'https://bablr.org/languages/core/en/bablr-vm-instruction-json',
|
|
23
|
+
dependencies: {
|
|
24
|
+
Instruction: canonicalURL,
|
|
25
|
+
},
|
|
26
|
+
grammar: class IJSON extends JSON.grammar {
|
|
27
|
+
*Expression(props) {
|
|
28
|
+
if (yield match(re`/(m|re|t|i)['"\u0060]/`)) {
|
|
29
|
+
yield eat(m`<__Instruction:Expression />`);
|
|
30
|
+
} else {
|
|
31
|
+
yield* super.Expression(props);
|
|
32
|
+
}
|
|
47
33
|
}
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
},
|
|
35
|
+
});
|
|
50
36
|
|
|
51
|
-
|
|
52
|
-
@Node
|
|
53
|
-
*Object() {
|
|
54
|
-
yield i`eat(<*Punctuator '{' balanced='}' /> 'openToken')`;
|
|
55
|
-
let sp = yield* eatMatchTrivia();
|
|
56
|
-
let first = true;
|
|
57
|
-
while ((first || sp) && (yield i`match(/./y)`)) {
|
|
58
|
-
yield i`eat(<Property /> 'properties[]$')`;
|
|
59
|
-
sp = yield* eatMatchTrivia();
|
|
60
|
-
first = false;
|
|
61
|
-
}
|
|
62
|
-
yield i`eat(<*Punctuator '}' balancer /> 'closeToken')`;
|
|
63
|
-
}
|
|
37
|
+
export const dependencies = { Space, CSTML, Spamex, Regex, JSON, IJSON };
|
|
64
38
|
|
|
39
|
+
export const grammar = class BABLRVMInstructionGrammar {
|
|
65
40
|
@Node
|
|
66
|
-
*
|
|
67
|
-
yield
|
|
68
|
-
yield* eatMatchTrivia();
|
|
69
|
-
yield i`eat(<*Punctuator ':' /> 'mapToken')`;
|
|
41
|
+
*Call() {
|
|
42
|
+
yield eat(m`callee$: <*Identifier />`);
|
|
70
43
|
yield* eatMatchTrivia();
|
|
71
|
-
yield i`eat(<Expression /> 'value$')`;
|
|
72
|
-
}
|
|
73
44
|
|
|
74
|
-
|
|
75
|
-
@Node
|
|
76
|
-
*Tuple() {
|
|
77
|
-
yield i`eat(<*Punctuator '(' balanced=')' /> 'openToken')`;
|
|
45
|
+
yield eat(m`openToken: <*Punctuator '(' { balanced: ')' } />`);
|
|
78
46
|
let sp = yield* eatMatchTrivia();
|
|
79
47
|
let first = true;
|
|
80
|
-
while ((first || sp) && (yield
|
|
81
|
-
yield
|
|
82
|
-
|
|
48
|
+
while ((first || sp) && (yield match(re`/./s`))) {
|
|
49
|
+
yield eat(m`values[]$: <__Expression />`);
|
|
50
|
+
yield* eatMatchTrivia();
|
|
51
|
+
sp = yield eatMatch(m`separatorTokens[]: <*Punctuator ',' />`);
|
|
52
|
+
yield* eatMatchTrivia();
|
|
83
53
|
first = false;
|
|
84
54
|
}
|
|
85
|
-
yield
|
|
55
|
+
yield eat(m`closeToken: <*Punctuator ')' { balancer: true } />`);
|
|
86
56
|
}
|
|
87
57
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
58
|
+
*Expression() {
|
|
59
|
+
yield eat(m`<_Any />`, [
|
|
60
|
+
m`<IJSON:Array '[' />`,
|
|
61
|
+
m`<IJSON:Object '{' />`,
|
|
62
|
+
m`<JSON:Boolean /true|false/ />`,
|
|
63
|
+
m`<JSON:Null 'null' />`,
|
|
64
|
+
m`<JSON:Number /[\d]|[+-]?Infinity/ />`,
|
|
65
|
+
m`<SpamexString /m["'\u0060]/ />`,
|
|
66
|
+
m`<CSTMLString /t["'\u0060]/ />`,
|
|
67
|
+
m`<RegexString /re["'\u0060]/ />`,
|
|
68
|
+
m`<InstructionString /i["'\u0060]/ />`,
|
|
69
|
+
m`<JSON:String /["']/ />`,
|
|
70
|
+
]);
|
|
92
71
|
}
|
|
93
72
|
|
|
94
|
-
@CoveredBy('Expression')
|
|
95
73
|
@Node
|
|
96
|
-
*
|
|
97
|
-
yield
|
|
74
|
+
*SpamexString({ ctx }) {
|
|
75
|
+
yield eat(m`sigilToken: <*Keyword 'm' />`);
|
|
76
|
+
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
77
|
+
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
78
|
+
yield eat(m`content: <__Spamex:Matcher />`);
|
|
79
|
+
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
98
80
|
}
|
|
99
81
|
|
|
100
|
-
@CoveredBy('Expression')
|
|
101
82
|
@Node
|
|
102
|
-
*
|
|
103
|
-
yield
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
yield
|
|
108
|
-
<Integer /-?\d/ />
|
|
109
|
-
<Infinity /[+-]I/ />
|
|
110
|
-
])`;
|
|
83
|
+
*CSTMLString({ ctx }) {
|
|
84
|
+
yield eat(m`sigilToken: <*Keyword 't' />`);
|
|
85
|
+
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
86
|
+
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
87
|
+
yield eat(m`content: <__CSTML:Tag />`);
|
|
88
|
+
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
111
89
|
}
|
|
112
90
|
|
|
113
91
|
@Node
|
|
114
|
-
*
|
|
115
|
-
yield
|
|
92
|
+
*RegexString({ ctx }) {
|
|
93
|
+
yield eat(m`sigilToken: <*Keyword 're' />`);
|
|
94
|
+
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
95
|
+
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
96
|
+
yield eat(m`content: <Regex:Pattern />`);
|
|
97
|
+
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
116
98
|
}
|
|
117
99
|
|
|
118
|
-
@CoveredBy('Number')
|
|
119
100
|
@Node
|
|
120
|
-
*
|
|
121
|
-
yield
|
|
122
|
-
yield
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
while (yield i`eatMatch(<*Digit /\d/ />)`);
|
|
101
|
+
*InstructionString({ ctx }) {
|
|
102
|
+
yield eat(m`sigilToken: <*Keyword 'i' />`);
|
|
103
|
+
let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
|
|
104
|
+
yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
|
|
105
|
+
yield eat(m`content: <Call />`);
|
|
106
|
+
yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
|
|
127
107
|
}
|
|
128
108
|
|
|
109
|
+
@CoveredBy('IJSONExpression')
|
|
110
|
+
@CoveredBy('Expression')
|
|
129
111
|
@Node
|
|
130
|
-
*
|
|
131
|
-
yield
|
|
112
|
+
*String() {
|
|
113
|
+
yield eat(m`<_IJSON:String />`);
|
|
132
114
|
}
|
|
133
115
|
|
|
134
|
-
@CoveredBy('Number')
|
|
135
116
|
@Node
|
|
136
|
-
*
|
|
137
|
-
yield
|
|
138
|
-
yield i`eat(<*Keyword 'Infinity' /> 'sigilToken')`;
|
|
117
|
+
*Identifier() {
|
|
118
|
+
yield eat(re`/[a-zA-Z]+/`);
|
|
139
119
|
}
|
|
140
120
|
|
|
141
121
|
@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.8.0",
|
|
4
4
|
"description": "A BABLR language for BABLR VM instructions",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12.0.0"
|
|
@@ -23,15 +23,17 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "^7.23.2",
|
|
26
|
-
"@bablr/agast-helpers": "
|
|
27
|
-
"@bablr/agast-vm-helpers": "
|
|
28
|
-
"@bablr/
|
|
29
|
-
"@bablr/
|
|
30
|
-
"@bablr/language-en-
|
|
31
|
-
"@bablr/language-en-
|
|
26
|
+
"@bablr/agast-helpers": "0.7.1",
|
|
27
|
+
"@bablr/agast-vm-helpers": "0.7.1",
|
|
28
|
+
"@bablr/boot": "0.8.1",
|
|
29
|
+
"@bablr/helpers": "0.22.1",
|
|
30
|
+
"@bablr/language-en-blank-space": "0.7.0",
|
|
31
|
+
"@bablr/language-en-cstml": "0.9.0",
|
|
32
|
+
"@bablr/language-en-regex-vm-pattern": "0.9.0",
|
|
33
|
+
"@bablr/language-en-spamex": "0.8.0",
|
|
34
|
+
"@bablr/language-en-cstml-json": "0.2.0"
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
|
-
"@bablr/boot": "^0.6.0",
|
|
35
37
|
"@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#49f5952efed27f94ee9b94340eb1563c440bf64e",
|
|
36
38
|
"@bablr/macrome": "^0.1.3",
|
|
37
39
|
"@bablr/macrome-generator-bablr": "^0.3.2",
|
package/lib/cstml.grammar.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* @macrome
|
|
2
|
-
* @generatedby @bablr/macrome-generator-bablr
|
|
3
|
-
* @generatedfrom ./cstml.grammar.macro.js#0e9820643a50afc4f9566750d5a2f9f5ab0e8ffd
|
|
4
|
-
* This file is autogenerated. Please do not edit it directly.
|
|
5
|
-
* When editing run `npx macrome watch` then change the file this is generated from.
|
|
6
|
-
*/
|
|
7
|
-
import { interpolateArray as _interpolateArray, interpolateFragmentChildren as _interpolateFragmentChildren, interpolateString as _interpolateString } from "@bablr/agast-helpers/template";
|
|
8
|
-
import * as _l from "@bablr/agast-vm-helpers/languages";
|
|
9
|
-
import * as _t from "@bablr/agast-helpers/shorthand";
|
|
10
|
-
import * as CSTML from '@bablr/language-en-cstml';
|
|
11
|
-
import * as Instruction from './grammar.js';
|
|
12
|
-
export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-cstml-instruction';
|
|
13
|
-
export const dependencies = {
|
|
14
|
-
...Instruction.dependencies,
|
|
15
|
-
CSTML
|
|
16
|
-
};
|
|
17
|
-
export const grammar = class BABLRVMSpamexInstructionGrammar extends Instruction.grammar {
|
|
18
|
-
*Expression() {
|
|
19
|
-
if (yield _t.node(_l.Instruction, "Call", [_t.ref`verb`, _t.ref`arguments`], {
|
|
20
|
-
verb: _t.s_node(_l.Instruction, "Identifier", "eatMatch"),
|
|
21
|
-
arguments: _t.node(_l.Instruction, "Tuple", [_t.ref`openToken`, _t.ref`values[]`, _t.arr(), _t.ref`values[]`, _t.ref`closeToken`], {
|
|
22
|
-
openToken: _t.s_node(_l.Instruction, "Punctuator", "("),
|
|
23
|
-
values: [_t.node(_l.Spamex, "NodeMatcher", [_t.ref`open`], {
|
|
24
|
-
open: _t.node(_l.Spamex, "OpenNodeMatcher", [_t.ref`openToken`, _t.ref`flags`, _t.ref`language`, _t.ref`namespaceSeparatorToken`, _t.ref`type`, _t.embedded(_t.node(_l.Spamex, "Space", [_t.lit(" ")], {}, {})), _t.ref`selfClosingTagToken`, _t.ref`closeToken`], {
|
|
25
|
-
openToken: _t.s_node(_l.Spamex, "Punctuator", "<"),
|
|
26
|
-
flags: _t.node(_l.CSTML, "Flags", [], {}, {}),
|
|
27
|
-
language: _t.node(_l.CSTML, "IdentifierPath", [_t.ref`segments[]`, _t.arr(), _t.ref`segments[]`], {
|
|
28
|
-
segments: [_t.s_node(_l.CSTML, "Identifier", "CSTML")]
|
|
29
|
-
}, {}),
|
|
30
|
-
namespaceSeparatorToken: _t.s_node(_l.CSTML, "Punctuator", ":"),
|
|
31
|
-
type: _t.s_node(_l.CSTML, "Identifier", "Tag"),
|
|
32
|
-
selfClosingTagToken: _t.s_node(_l.Spamex, "Punctuator", "/"),
|
|
33
|
-
closeToken: _t.s_node(_l.Spamex, "Punctuator", ">")
|
|
34
|
-
}, {})
|
|
35
|
-
}, {})],
|
|
36
|
-
closeToken: _t.s_node(_l.Instruction, "Punctuator", ")")
|
|
37
|
-
}, {})
|
|
38
|
-
}, {})) {
|
|
39
|
-
// done
|
|
40
|
-
} else {
|
|
41
|
-
yield* super.Expression();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { i } from '@bablr/boot/shorthand.macro';
|
|
2
|
-
import * as CSTML from '@bablr/language-en-cstml';
|
|
3
|
-
import * as Instruction from './grammar.js';
|
|
4
|
-
|
|
5
|
-
export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-cstml-instruction';
|
|
6
|
-
|
|
7
|
-
export const dependencies = { ...Instruction.dependencies, CSTML };
|
|
8
|
-
|
|
9
|
-
export const grammar = class BABLRVMSpamexInstructionGrammar extends Instruction.grammar {
|
|
10
|
-
*Expression() {
|
|
11
|
-
if (yield i`eatMatch(<CSTML:Tag />)`) {
|
|
12
|
-
// done
|
|
13
|
-
} else {
|
|
14
|
-
yield* super.Expression();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
package/lib/spamex.grammar.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/* @macrome
|
|
2
|
-
* @generatedby @bablr/macrome-generator-bablr
|
|
3
|
-
* @generatedfrom ./spamex.grammar.macro.js#50b55ad80fe83916d9ab600b27e0c4ae14fe1399
|
|
4
|
-
* This file is autogenerated. Please do not edit it directly.
|
|
5
|
-
* When editing run `npx macrome watch` then change the file this is generated from.
|
|
6
|
-
*/
|
|
7
|
-
import { interpolateArray as _interpolateArray, interpolateFragmentChildren as _interpolateFragmentChildren, interpolateString as _interpolateString } from "@bablr/agast-helpers/template";
|
|
8
|
-
import * as _l from "@bablr/agast-vm-helpers/languages";
|
|
9
|
-
import * as _t from "@bablr/agast-helpers/shorthand";
|
|
10
|
-
import * as Spamex from '@bablr/language-en-spamex';
|
|
11
|
-
import * as Instruction from './grammar.js';
|
|
12
|
-
export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-spamex-instruction';
|
|
13
|
-
export const dependencies = {
|
|
14
|
-
...Instruction.dependencies,
|
|
15
|
-
Spamex
|
|
16
|
-
};
|
|
17
|
-
export const grammar = class BABLRVMSpamexInstructionGrammar extends Instruction.grammar {
|
|
18
|
-
*Expression() {
|
|
19
|
-
if (yield _t.node(_l.Instruction, "Call", [_t.ref`verb`, _t.ref`arguments`], {
|
|
20
|
-
verb: _t.s_node(_l.Instruction, "Identifier", "eatMatch"),
|
|
21
|
-
arguments: _t.node(_l.Instruction, "Tuple", [_t.ref`openToken`, _t.ref`values[]`, _t.arr(), _t.ref`values[]`, _t.ref`closeToken`], {
|
|
22
|
-
openToken: _t.s_node(_l.Instruction, "Punctuator", "("),
|
|
23
|
-
values: [_t.node(_l.Spamex, "NodeMatcher", [_t.ref`open`], {
|
|
24
|
-
open: _t.node(_l.Spamex, "OpenNodeMatcher", [10, [[_t.ref`openToken`, _t.ref`flags`, _t.ref`language`, _t.ref`namespaceSeparatorToken`], [_t.ref`type`, _t.embedded(_t.node(_l.Spamex, "Space", [_t.lit(" ")], {}, {})), _t.ref`intrinsicValue`, _t.embedded(_t.node(_l.Spamex, "Space", [_t.lit(" ")], {}, {})), _t.ref`selfClosingTagToken`, _t.ref`closeToken`]]], {
|
|
25
|
-
openToken: _t.s_node(_l.Spamex, "Punctuator", "<"),
|
|
26
|
-
flags: _t.node(_l.CSTML, "Flags", [], {}, {}),
|
|
27
|
-
language: _t.node(_l.CSTML, "IdentifierPath", [_t.ref`segments[]`, _t.arr(), _t.ref`segments[]`], {
|
|
28
|
-
segments: [_t.s_node(_l.CSTML, "Identifier", "Spamex")]
|
|
29
|
-
}, {}),
|
|
30
|
-
namespaceSeparatorToken: _t.s_node(_l.CSTML, "Punctuator", ":"),
|
|
31
|
-
type: _t.s_node(_l.CSTML, "Identifier", "Matcher"),
|
|
32
|
-
intrinsicValue: _t.node(_l.Regex, "Pattern", [_t.ref`openToken`, _t.ref`alternatives[]`, _t.arr(), _t.ref`alternatives[]`, _t.ref`closeToken`], {
|
|
33
|
-
openToken: _t.s_node(_l.Regex, "Punctuator", "/"),
|
|
34
|
-
alternatives: [_t.node(_l.Regex, "Alternative", [_t.ref`elements[]`, _t.arr(), _t.ref`elements[]`], {
|
|
35
|
-
elements: [_t.node(_l.Regex, "CharacterClass", [_t.ref`openToken`, _t.ref`elements[]`, _t.arr(), _t.ref`elements[]`, _t.ref`elements[]`, _t.ref`elements[]`, _t.ref`elements[]`, _t.ref`closeToken`], {
|
|
36
|
-
openToken: _t.s_node(_l.Regex, "Punctuator", "["),
|
|
37
|
-
elements: [_t.node(_l.Regex, "Character", [_t.lit("<")], {}, {}), _t.node(_l.Regex, "Character", [_t.lit("'")], {}, {}), _t.node(_l.Regex, "Character", [_t.lit("\"")], {}, {}), _t.node(_l.Regex, "Character", [_t.lit("/")], {}, {})],
|
|
38
|
-
closeToken: _t.s_node(_l.Regex, "Punctuator", "]")
|
|
39
|
-
}, {
|
|
40
|
-
negate: false
|
|
41
|
-
})]
|
|
42
|
-
}, {})],
|
|
43
|
-
closeToken: _t.s_node(_l.Regex, "Punctuator", "/")
|
|
44
|
-
}, {}),
|
|
45
|
-
selfClosingTagToken: _t.s_node(_l.Spamex, "Punctuator", "/"),
|
|
46
|
-
closeToken: _t.s_node(_l.Spamex, "Punctuator", ">")
|
|
47
|
-
}, {})
|
|
48
|
-
}, {})],
|
|
49
|
-
closeToken: _t.s_node(_l.Instruction, "Punctuator", ")")
|
|
50
|
-
}, {})
|
|
51
|
-
}, {})) {
|
|
52
|
-
// done
|
|
53
|
-
} else {
|
|
54
|
-
yield* super.Expression();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { i } from '@bablr/boot/shorthand.macro';
|
|
2
|
-
import * as Spamex from '@bablr/language-en-spamex';
|
|
3
|
-
import * as Instruction from './grammar.js';
|
|
4
|
-
|
|
5
|
-
export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-spamex-instruction';
|
|
6
|
-
|
|
7
|
-
export const dependencies = { ...Instruction.dependencies, Spamex };
|
|
8
|
-
|
|
9
|
-
export const grammar = class BABLRVMSpamexInstructionGrammar extends Instruction.grammar {
|
|
10
|
-
*Expression() {
|
|
11
|
-
if (yield i`eatMatch(<Spamex:Matcher /[<'"/]/ />)`) {
|
|
12
|
-
// done
|
|
13
|
-
} else {
|
|
14
|
-
yield* super.Expression();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|