@weborigami/language 0.0.36 → 0.0.38
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/language",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "Web Origami expression language compiler and runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./main.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"typescript": "5.2.2"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@weborigami/types": "
|
|
14
|
-
"@weborigami/async-tree": "
|
|
13
|
+
"@weborigami/types": "*",
|
|
14
|
+
"@weborigami/async-tree": "*",
|
|
15
15
|
"peggy": "3.0.2",
|
|
16
16
|
"watcher": "2.3.0"
|
|
17
17
|
},
|
package/src/compiler/parse.js
CHANGED
|
@@ -278,7 +278,7 @@ function peg$parse(input, options) {
|
|
|
278
278
|
var peg$f16 = function(head, tail) {
|
|
279
279
|
return [head].concat(tail);
|
|
280
280
|
};
|
|
281
|
-
var peg$f17 = function(key) { return [key, [ops.
|
|
281
|
+
var peg$f17 = function(key) { return [key, [ops.scope, key]]; };
|
|
282
282
|
var peg$f18 = function(list) { return list ?? [undefined]; };
|
|
283
283
|
var peg$f19 = function(head, tail) { return [head].concat(tail); };
|
|
284
284
|
var peg$f20 = function(key) { return [key]; };
|
|
@@ -259,7 +259,7 @@ describe("Origami parser", () => {
|
|
|
259
259
|
assertParse("object", "{ a: 1, b }", [
|
|
260
260
|
ops.object,
|
|
261
261
|
["a", 1],
|
|
262
|
-
["b", [ops.
|
|
262
|
+
["b", [ops.scope, "b"]],
|
|
263
263
|
]);
|
|
264
264
|
});
|
|
265
265
|
|
|
@@ -275,7 +275,7 @@ describe("Origami parser", () => {
|
|
|
275
275
|
test("objectPropertyOrShorthand", () => {
|
|
276
276
|
assertParse("objectPropertyOrShorthand", "foo", [
|
|
277
277
|
"foo",
|
|
278
|
-
[ops.
|
|
278
|
+
[ops.scope, "foo"],
|
|
279
279
|
]);
|
|
280
280
|
assertParse("objectPropertyOrShorthand", "x: y", ["x", [ops.scope, "y"]]);
|
|
281
281
|
});
|