@bablr/language-en-bablr-vm-instruction 0.9.0 → 0.10.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 CHANGED
@@ -1,13 +1,13 @@
1
1
  /* @macrome
2
2
  * @generatedby @bablr/macrome-generator-bablr
3
- * @generatedfrom ./grammar.macro.js#d59a1c2024ebd27e109c529425646b0eb4863552
3
+ * @generatedfrom ./grammar.macro.js#47f25aae061ffc415e01f1c6898e6397cd0a8e0b
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
  */
7
7
  import _applyDecs from "@babel/runtime/helpers/applyDecs2305";
8
8
  let _initProto, _StringDecs, _PunctuatorDecs, _KeywordDecs, _AnyDecs;
9
9
  import { re, spam as m } from '@bablr/boot';
10
- import { extendLanguage, o, eat, match, eatMatch } from '@bablr/helpers/grammar';
10
+ import { extendLanguage, eat, match, eatMatch } from '@bablr/helpers/grammar';
11
11
  import { CoveredBy, Node, InjectFrom } from '@bablr/helpers/decorators';
12
12
  import * as Space from '@bablr/language-en-blank-space';
13
13
  import * as CSTML from '@bablr/language-en-cstml';
@@ -17,9 +17,10 @@ import * as JSON from '@bablr/language-en-cstml-json';
17
17
  import * as productions from '@bablr/helpers/productions';
18
18
  import { buildString } from '@bablr/helpers/builders';
19
19
  export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-instruction';
20
+ export const defaultMatcher = m`<Call />`;
20
21
  export function* eatMatchTrivia() {
21
22
  if (yield match(re`/[ \t\n]/`)) {
22
- return yield eat(m`#: :Space: <*Space />`);
23
+ return yield eat(m`#: :Space: <__Blank />`);
23
24
  }
24
25
  return null;
25
26
  }
@@ -31,7 +32,7 @@ const IJSON = extendLanguage(JSON, {
31
32
  grammar: class IJSON extends JSON.grammar {
32
33
  *Expression(props) {
33
34
  if (yield match(re`/(m|re|t|i)['"\u0060]/`)) {
34
- yield eat(m`:Instruction: <_Expression />`);
35
+ yield eat(m`:Instruction: <__Expression />`);
35
36
  } else {
36
37
  yield* super.Expression(props);
37
38
  }
@@ -60,16 +61,16 @@ export const grammar = class BABLRVMInstructionGrammar {
60
61
  let sp = yield* eatMatchTrivia();
61
62
  let first = true;
62
63
  while ((first || sp) && (yield match(re`/./s`))) {
63
- yield eat(m`values[]$: <__Expression />`);
64
+ yield eat(m`values[]$: <_Expression />`);
64
65
  yield* eatMatchTrivia();
65
- sp = yield eatMatch(m`separatorTokens[]: <*Punctuator ',' />`);
66
+ sp = yield eatMatch(m`#separatorTokens[]: <*Punctuator ',' />`);
66
67
  yield* eatMatchTrivia();
67
68
  first = false;
68
69
  }
69
70
  yield eat(m`closeToken: <*Punctuator ')' { balancer: true } />`);
70
71
  }
71
72
  *Expression() {
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
+ 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
74
  }
74
75
  *SpamexString({
75
76
  ctx
@@ -77,7 +78,7 @@ export const grammar = class BABLRVMInstructionGrammar {
77
78
  yield eat(m`sigilToken: <*Keyword 'm' />`);
78
79
  let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
79
80
  yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
80
- yield eat(m`content: :Spamex: <__Matcher />`);
81
+ yield eat(m`content: :Spamex: <_Matcher />`);
81
82
  yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
82
83
  }
83
84
  *CSTMLString({
@@ -86,7 +87,7 @@ export const grammar = class BABLRVMInstructionGrammar {
86
87
  yield eat(m`sigilToken: <*Keyword 't' />`);
87
88
  let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
88
89
  yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
89
- yield eat(m`content: :CSTML: <__Tag />`);
90
+ yield eat(m`content: :CSTML: <_Tag />`);
90
91
  yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
91
92
  }
92
93
  *RegexString({
@@ -108,7 +109,7 @@ export const grammar = class BABLRVMInstructionGrammar {
108
109
  yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
109
110
  }
110
111
  *String() {
111
- yield eat(m`:IJSON: <_String />`);
112
+ yield eat(m`:IJSON: <__String />`);
112
113
  }
113
114
  *Identifier() {
114
115
  yield eat(re`/[a-zA-Z]+/`);
@@ -1,5 +1,5 @@
1
1
  import { re, spam as m } from '@bablr/boot';
2
- import { extendLanguage, o, eat, match, eatMatch } from '@bablr/helpers/grammar';
2
+ import { extendLanguage, eat, match, eatMatch } from '@bablr/helpers/grammar';
3
3
  import { CoveredBy, Node, InjectFrom } from '@bablr/helpers/decorators';
4
4
  import * as Space from '@bablr/language-en-blank-space';
5
5
  import * as CSTML from '@bablr/language-en-cstml';
@@ -11,9 +11,11 @@ import { buildString } from '@bablr/helpers/builders';
11
11
 
12
12
  export const canonicalURL = 'https://bablr.org/languages/core/en/bablr-vm-instruction';
13
13
 
14
+ export const defaultMatcher = m`<Call />`;
15
+
14
16
  export function* eatMatchTrivia() {
15
17
  if (yield match(re`/[ \t\n]/`)) {
16
- return yield eat(m`#: :Space: <*Space />`);
18
+ return yield eat(m`#: :Space: <__Blank />`);
17
19
  }
18
20
  return null;
19
21
  }
@@ -26,7 +28,7 @@ const IJSON = extendLanguage(JSON, {
26
28
  grammar: class IJSON extends JSON.grammar {
27
29
  *Expression(props) {
28
30
  if (yield match(re`/(m|re|t|i)['"\u0060]/`)) {
29
- yield eat(m`:Instruction: <_Expression />`);
31
+ yield eat(m`:Instruction: <__Expression />`);
30
32
  } else {
31
33
  yield* super.Expression(props);
32
34
  }
@@ -46,9 +48,9 @@ export const grammar = class BABLRVMInstructionGrammar {
46
48
  let sp = yield* eatMatchTrivia();
47
49
  let first = true;
48
50
  while ((first || sp) && (yield match(re`/./s`))) {
49
- yield eat(m`values[]$: <__Expression />`);
51
+ yield eat(m`values[]$: <_Expression />`);
50
52
  yield* eatMatchTrivia();
51
- sp = yield eatMatch(m`separatorTokens[]: <*Punctuator ',' />`);
53
+ sp = yield eatMatch(m`#separatorTokens[]: <*Punctuator ',' />`);
52
54
  yield* eatMatchTrivia();
53
55
  first = false;
54
56
  }
@@ -56,7 +58,7 @@ export const grammar = class BABLRVMInstructionGrammar {
56
58
  }
57
59
 
58
60
  *Expression() {
59
- yield eat(m`<_Any />`, [
61
+ yield eat(m`<__Any />`, [
60
62
  m`:IJSON: <Array '[' />`,
61
63
  m`:IJSON: <Object '{' />`,
62
64
  m`:JSON: <Boolean /true|false/ />`,
@@ -76,7 +78,7 @@ export const grammar = class BABLRVMInstructionGrammar {
76
78
  yield eat(m`sigilToken: <*Keyword 'm' />`);
77
79
  let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
78
80
  yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
79
- yield eat(m`content: :Spamex: <__Matcher />`);
81
+ yield eat(m`content: :Spamex: <_Matcher />`);
80
82
  yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
81
83
  }
82
84
 
@@ -85,7 +87,7 @@ export const grammar = class BABLRVMInstructionGrammar {
85
87
  yield eat(m`sigilToken: <*Keyword 't' />`);
86
88
  let quot = buildString(ctx.sourceTextFor(yield match(re`/['"\u0060]/`)));
87
89
  yield eat(m`openToken: <*Punctuator ${quot} { balanced: ${quot} } />`);
88
- yield eat(m`content: :CSTML: <__Tag />`);
90
+ yield eat(m`content: :CSTML: <_Tag />`);
89
91
  yield eat(m`closeToken: <*Punctuator ${quot} { balancer: true } />`);
90
92
  }
91
93
 
@@ -111,7 +113,7 @@ export const grammar = class BABLRVMInstructionGrammar {
111
113
  @CoveredBy('Expression')
112
114
  @Node
113
115
  *String() {
114
- yield eat(m`:IJSON: <_String />`);
116
+ yield eat(m`:IJSON: <__String />`);
115
117
  }
116
118
 
117
119
  @Node
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bablr/language-en-bablr-vm-instruction",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "A BABLR language for BABLR VM instructions",
5
5
  "engines": {
6
6
  "node": ">=12.0.0"
@@ -22,16 +22,16 @@
22
22
  "clean": "macrome clean"
23
23
  },
24
24
  "dependencies": {
25
- "@babel/runtime": "^7.23.2",
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"
25
+ "@babel/runtime": "7.28.2",
26
+ "@bablr/agast-helpers": "0.9.0",
27
+ "@bablr/agast-vm-helpers": "0.9.0",
28
+ "@bablr/boot": "0.10.0",
29
+ "@bablr/helpers": "0.24.0",
30
+ "@bablr/language-en-blank-space": "0.9.0",
31
+ "@bablr/language-en-cstml": "0.11.0",
32
+ "@bablr/language-en-regex-vm-pattern": "0.11.0",
33
+ "@bablr/language-en-spamex": "0.10.0",
34
+ "@bablr/language-en-cstml-json": "0.4.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#c97bfa4b3663f8378e9b3e42bb5a41e685406cf9",