@bablr/agast-vm 0.1.1 → 0.1.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 +5 -1
  2. package/package.json +4 -4
package/lib/evaluate.js CHANGED
@@ -199,6 +199,10 @@ const __evaluate = function* agastStrategy(ctx, strategy) {
199
199
  }
200
200
  }
201
201
 
202
+ if (intrinsicValue && !flags.token) {
203
+ throw new Error('intrinsic nodes must occur inside tokens');
204
+ }
205
+
202
206
  if (!flags.expression) {
203
207
  const { flags } = openTag.value;
204
208
 
@@ -207,7 +211,7 @@ const __evaluate = function* agastStrategy(ctx, strategy) {
207
211
  s.path = s.path.push(ctx, tag);
208
212
  s.node.resolver.consume(tag);
209
213
  }
210
- } else {
214
+ } else if (!intrinsicValue) {
211
215
  s.expressionDepth++;
212
216
  }
213
217
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bablr/agast-vm",
3
3
  "description": "A VM providing DOM-like guarantees about agAST trees",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",
7
7
  "files": [
@@ -15,15 +15,15 @@
15
15
  "test": "node ./test/runner.js"
16
16
  },
17
17
  "dependencies": {
18
- "@bablr/agast-helpers": "0.1.0",
19
- "@bablr/agast-vm-helpers": "0.1.0",
18
+ "@bablr/agast-helpers": "0.1.1",
19
+ "@bablr/agast-vm-helpers": "0.1.1",
20
20
  "@bablr/coroutine": "0.1.0",
21
21
  "@bablr/weak-stack": "0.1.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@bablr/agast-vm-strategy-passthrough": "github:bablr-lang/agast-vm-strategy-passthrough#2bd3a0c7311037af92c5b81941c79161499f6c9e",
25
25
  "@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#49f5952efed27f94ee9b94340eb1563c440bf64e",
26
- "@bablr/strategy_enhancer-debug-log": "0.1.0",
26
+ "@bablr/strategy_enhancer-debug-log": "0.1.1",
27
27
  "enhanced-resolve": "^5.12.0",
28
28
  "eslint": "^8.32.0",
29
29
  "eslint-import-resolver-enhanced-resolve": "^1.0.5",