simplex-lang 0.0.3 → 0.0.4
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/build/parser/index.js +161 -93
- package/build/parser/index.js.map +1 -1
- package/build/src/compiler.js +2 -1
- package/build/src/compiler.js.map +1 -1
- package/build/src/index.d.ts +1 -0
- package/build/src/index.js +1 -0
- package/build/src/index.js.map +1 -1
- package/build/src/simplex-tree.d.ts +1 -0
- package/build/src/version.d.ts +1 -0
- package/build/src/version.js +2 -0
- package/build/src/version.js.map +1 -0
- package/package.json +3 -2
- package/parser/index.js +151 -93
- package/parser/index.js.map +1 -1
- package/src/compiler.ts +1 -1
- package/src/index.ts +1 -0
- package/src/simplex-tree.ts +1 -0
- package/src/simplex.peggy +8 -2
- package/src/version.ts +1 -0
package/src/compiler.ts
CHANGED
|
@@ -521,7 +521,7 @@ export function compile<Data = Record<string, unknown>, Globals = null>(
|
|
|
521
521
|
try {
|
|
522
522
|
return func(data)
|
|
523
523
|
} catch (err) {
|
|
524
|
-
|
|
524
|
+
if (err instanceof Error === false) throw err
|
|
525
525
|
|
|
526
526
|
const stackRows = err.stack?.split('\n').map(row => row.trim())
|
|
527
527
|
|
package/src/index.ts
CHANGED
package/src/simplex-tree.ts
CHANGED
package/src/simplex.peggy
CHANGED
|
@@ -474,12 +474,17 @@ MemberExpression
|
|
|
474
474
|
tail:(
|
|
475
475
|
__ "[" __ property:Expression __ "]" {
|
|
476
476
|
return {
|
|
477
|
-
property: property, computed: true, location: getLocation(location())
|
|
477
|
+
property: property, computed: true, extension: false, location: getLocation(location())
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
480
|
/ __ "." __ property:IdentifierName {
|
|
481
481
|
return {
|
|
482
|
-
property: property, computed: false, location: getLocation(location())
|
|
482
|
+
property: property, computed: false, extension: false, location: getLocation(location())
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
/ __ "::" __ property:IdentifierName {
|
|
486
|
+
return {
|
|
487
|
+
property: property, computed: false, extension: true, location: getLocation(location())
|
|
483
488
|
};
|
|
484
489
|
}
|
|
485
490
|
)*
|
|
@@ -490,6 +495,7 @@ MemberExpression
|
|
|
490
495
|
object: result,
|
|
491
496
|
property: element.property,
|
|
492
497
|
computed: element.computed,
|
|
498
|
+
extension: element.extension,
|
|
493
499
|
location: getLocation(location())
|
|
494
500
|
};
|
|
495
501
|
}, head);
|
package/src/version.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const version = '0.0.4'
|