@bablr/agast-vm-helpers 0.10.2 → 0.10.3

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/index.js +2 -9
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -269,14 +269,12 @@ export const reifyExpression = (node) => {
269
269
  let attributes = get('attributes', node);
270
270
  let literalValue = get('literalValue', node);
271
271
  let openToken = get('openToken', node);
272
- let selfClosing = get('selfClosingToken', node);
272
+ let { selfClosing } = node.value.attributes;
273
273
 
274
274
  literalValue = literalValue && reifyExpression(literalValue);
275
275
 
276
276
  if (!openToken) {
277
- if (!literalValue) throw new Error();
278
-
279
- return buildOpenNodeTag(tokenFlags, null, literalValue, {});
277
+ return buildOpenNodeTag(tokenFlags, null, literalValue, {}, selfClosing);
280
278
  }
281
279
 
282
280
  let anonymousToken = !openToken;
@@ -285,11 +283,6 @@ export const reifyExpression = (node) => {
285
283
  type = reifyExpression(type);
286
284
  name = reifyExpression(name);
287
285
  attributes = reifyExpression(attributes) || {};
288
- selfClosing = !!reifyExpression(selfClosing);
289
-
290
- // if (literalValue && !flags.token) {
291
- // return buildOpenNodeTag(tokenFlags, null, literalValue, {}, true);
292
- // }
293
286
 
294
287
  return buildFullOpenNodeTag(flags, type, name, literalValue, attributes, selfClosing);
295
288
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bablr/agast-vm-helpers",
3
3
  "description": "Helper functions for working with the BABLR VM",
4
- "version": "0.10.2",
4
+ "version": "0.10.3",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",
7
7
  "files": [