@bablr/language-en-json 0.4.0 → 0.5.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,6 +1,6 @@
1
1
  /* @macrome
2
2
  * @generatedby @bablr/macrome-generator-bablr
3
- * @generatedfrom ./grammar.macro.js#8e38cbef6aca9da2e26c57cb190d3282281b0286
3
+ * @generatedfrom ./grammar.macro.js#1bde898253c86ebc7bd3a504fbc17998de126dc7
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
  */
@@ -778,7 +778,7 @@ export const grammar = triviaEnhancer({
778
778
  closeToken: _t.s_i_node(_l.Instruction, "Punctuator", ")")
779
779
  }, {})
780
780
  }, {});
781
- cooked = parseInt(ctx.getProperty(codeNode, 'digits').map(digit => ctx.sourceTextFor(digit)).join(''), 16);
781
+ cooked = parseInt(codeNode.properties.digits.map(digit => ctx.sourceTextFor(digit)).join(''), 16);
782
782
  } else {
783
783
  yield _t.node(_l.Instruction, "Call", [_t.ref`verb`, _t.ref`arguments`], {
784
784
  verb: _t.s_node(_l.Instruction, "Identifier", "fail"),
@@ -1102,7 +1102,7 @@ export const grammar = triviaEnhancer({
1102
1102
  const {
1103
1103
  noDoubleZero = false
1104
1104
  } = props && ctx.unbox(props) || {};
1105
- let [firstDigit] = ctx.ownTerminalsFor(yield _t.node(_l.Instruction, "Call", [_t.ref`verb`, _t.ref`arguments`], {
1105
+ let [firstDigit] = ctx.allTerminalsFor(yield _t.node(_l.Instruction, "Call", [_t.ref`verb`, _t.ref`arguments`], {
1106
1106
  verb: _t.s_node(_l.Instruction, "Identifier", "eat"),
1107
1107
  arguments: _t.node(_l.Instruction, "Tuple", [_t.ref`openToken`, _t.ref`values[]`, _t.ref`closeToken`], {
1108
1108
  openToken: _t.s_i_node(_l.Instruction, "Punctuator", "("),
@@ -114,10 +114,7 @@ export const grammar = triviaEnhancer(
114
114
  } else if (yield i`match('u')`) {
115
115
  const codeNode = yield i`eat(<EscapeCode> 'value')`;
116
116
  cooked = parseInt(
117
- ctx
118
- .getProperty(codeNode, 'digits')
119
- .map((digit) => ctx.sourceTextFor(digit))
120
- .join(''),
117
+ codeNode.properties.digits.map((digit) => ctx.sourceTextFor(digit)).join(''),
121
118
  16,
122
119
  );
123
120
  } else {
@@ -172,7 +169,7 @@ export const grammar = triviaEnhancer(
172
169
  *UnsignedInteger({ value: props, ctx }) {
173
170
  const { noDoubleZero = false } = (props && ctx.unbox(props)) || {};
174
171
 
175
- let [firstDigit] = ctx.ownTerminalsFor(yield i`eat(/\d/)`);
172
+ let [firstDigit] = ctx.allTerminalsFor(yield i`eat(/\d/)`);
176
173
 
177
174
  if (!noDoubleZero || firstDigit.value !== '0') {
178
175
  yield i`eatMatch(/\d+/)`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bablr/language-en-json",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A BABLR language for JSON",
5
5
  "engines": {
6
6
  "node": ">=12.0.0"
@@ -21,19 +21,19 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@bablr/agast-vm-helpers": "0.2.0",
25
- "@bablr/boot": "0.3.0",
26
- "@bablr/helpers": "0.17.0",
24
+ "@bablr/agast-vm-helpers": "0.3.0",
25
+ "@bablr/boot": "0.4.0",
26
+ "@bablr/helpers": "0.18.0",
27
27
  "@bablr/language-en-blank-space": "0.2.0",
28
28
  "@babel/runtime": "^7.22.15"
29
29
  },
30
30
  "devDependencies": {
31
- "@bablr/agast-helpers": "0.2.0",
31
+ "@bablr/agast-helpers": "0.3.1",
32
32
  "@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#49f5952efed27f94ee9b94340eb1563c440bf64e",
33
33
  "@bablr/macrome": "0.1.3",
34
34
  "@bablr/macrome-generator-bablr": "0.3.1",
35
35
  "@qnighy/dedent": "0.1.1",
36
- "bablr": "0.3.0",
36
+ "bablr": "0.4.0",
37
37
  "enhanced-resolve": "^5.12.0",
38
38
  "eslint": "^7.32.0",
39
39
  "eslint-import-resolver-enhanced-resolve": "^1.0.5",