@ibyar/expressions 0.8.4 → 0.8.5
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/package.json +2 -2
- package/v8/inline.js +4 -3
- package/v8/inline.js.map +1 -1
- package/v8/stream.js +1 -1
- package/v8/stream.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibyar/expressions",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "Aurora expression, an template expression and evaluation, An 100% spec compliant ES2022 JavaScript toolchain,",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ibyar/aurora/tree/dev/packages/expressions",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"backend",
|
|
62
62
|
"front-end"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "a1784ccbeaa95037b6bd94d4d0d1d0a2928bc2ac"
|
|
65
65
|
}
|
package/v8/inline.js
CHANGED
|
@@ -1415,7 +1415,7 @@ export class JavaScriptInlineParser extends AbstractParser {
|
|
|
1415
1415
|
const template = next.getValue();
|
|
1416
1416
|
return this.createTemplateLiteralExpressionNode([template.string], [], tag, template.range);
|
|
1417
1417
|
}
|
|
1418
|
-
this.consume(Token.TEMPLATE_SPAN);
|
|
1418
|
+
const start = this.consume(Token.TEMPLATE_SPAN);
|
|
1419
1419
|
const expressions = [];
|
|
1420
1420
|
const strings = [];
|
|
1421
1421
|
strings.push(next.getValue().string);
|
|
@@ -1440,8 +1440,9 @@ export class JavaScriptInlineParser extends AbstractParser {
|
|
|
1440
1440
|
if (next.isNotType(Token.TEMPLATE_TAIL)) {
|
|
1441
1441
|
throw new SyntaxError(this.errorMessage(`Unexpected Token: ${JSON.stringify(next)}`));
|
|
1442
1442
|
}
|
|
1443
|
+
const range = this.createRange(start);
|
|
1443
1444
|
// Once we've reached a TEMPLATE_TAIL, we can close the TemplateLiteral.
|
|
1444
|
-
return this.createTemplateLiteralExpressionNode(strings, expressions, tag);
|
|
1445
|
+
return this.createTemplateLiteralExpressionNode(strings, expressions, tag, range);
|
|
1445
1446
|
}
|
|
1446
1447
|
createTemplateLiteralExpressionNode(strings, expressions, tag, range) {
|
|
1447
1448
|
if (tag) {
|
|
@@ -2099,7 +2100,7 @@ export class JavaScriptInlineParser extends AbstractParser {
|
|
|
2099
2100
|
x = this.factory.createInfixExpression(cmp.getName(), x, y, this.createRange(x));
|
|
2100
2101
|
if (op.isNotType(cmp)) {
|
|
2101
2102
|
// The comparison was negated - add a NOT.
|
|
2102
|
-
x = this.factory.createUnaryExpression(Token.NOT.getName(), x, this.createRange(
|
|
2103
|
+
x = this.factory.createUnaryExpression(Token.NOT.getName(), x, this.createRange(op));
|
|
2103
2104
|
}
|
|
2104
2105
|
}
|
|
2105
2106
|
else {
|