@bablr/bablr-vm 0.13.1 → 0.13.2

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.
Files changed (2) hide show
  1. package/lib/evaluate.js +10 -6
  2. package/package.json +4 -4
package/lib/evaluate.js CHANGED
@@ -290,14 +290,18 @@ const __evaluate = function* bablrStrategy(ctx, rootLanguage, rootSource, agastS
290
290
  Math.min(s.path.depth + 1, rejectedState.path.depth),
291
291
  );
292
292
 
293
- const { name, isArray } = lowPath.reference?.value || {};
293
+ if (s.path.depth) {
294
+ const { name, isArray } = lowPath.reference?.value || {};
294
295
 
295
- if (!s.node.resolver.counters.has(name) && !lowPath.openTag?.value.flags.trivia) {
296
- yield buildCall('advance', buildReference(name, isArray));
297
- }
296
+ if (s.node.depth === s.path.depth && !s.node.resolver.counters.has(name)) {
297
+ if (!lowPath.openTag?.value.flags.trivia && !lowPath.openTag?.value.flags.escape) {
298
+ yield buildCall('advance', buildReference(name, isArray));
299
+ }
298
300
 
299
- if (s.result.type === 'Reference') {
300
- yield buildCall('advance', buildNull());
301
+ if (s.result.type === 'Reference') {
302
+ yield buildCall('advance', buildNull());
303
+ }
304
+ }
301
305
  }
302
306
  }
303
307
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bablr/bablr-vm",
3
3
  "description": "A VM for parsing using BABLR languages",
4
- "version": "0.13.1",
4
+ "version": "0.13.2",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",
7
7
  "files": [
@@ -12,10 +12,10 @@
12
12
  },
13
13
  "sideEffects": false,
14
14
  "dependencies": {
15
- "@bablr/agast-helpers": "0.1.0",
16
- "@bablr/agast-vm-helpers": "0.1.0",
15
+ "@bablr/agast-helpers": "0.1.1",
16
+ "@bablr/agast-vm-helpers": "0.1.1",
17
17
  "@bablr/coroutine": "0.1.0",
18
- "@bablr/helpers": "0.15.0",
18
+ "@bablr/helpers": "0.15.1",
19
19
  "@bablr/regex-vm": "0.5.0",
20
20
  "@bablr/weak-stack": "0.1.0",
21
21
  "@iter-tools/imm-stack": "1.1.0",