@weborigami/language 0.0.66-beta.2 → 0.0.67-beta.1

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.66-beta.2",
3
+ "version": "0.0.67-beta.1",
4
4
  "description": "Web Origami expression language compiler and runtime",
5
5
  "type": "module",
6
6
  "main": "./main.js",
@@ -11,8 +11,8 @@
11
11
  "typescript": "5.6.2"
12
12
  },
13
13
  "dependencies": {
14
- "@weborigami/async-tree": "0.0.66-beta.2",
15
- "@weborigami/types": "0.0.66-beta.2",
14
+ "@weborigami/async-tree": "0.0.67-beta.1",
15
+ "@weborigami/types": "0.0.67-beta.1",
16
16
  "watcher": "2.3.1"
17
17
  },
18
18
  "scripts": {
@@ -336,14 +336,14 @@ protocol "protocol"
336
336
  / scopeReference
337
337
 
338
338
  reservedProtocol "reserved protocol"
339
- = "haskeys" { return ops.openSite; }
339
+ = "explore" { return ops.explorableSite; }
340
340
  / "https" { return ops.https; } // Must come before "http"
341
341
  / "http" { return ops.http; }
342
342
  / "new" { return ops.constructor; }
343
343
  / "package" { return [ops.scope, "@package"] } // Alias
344
- / "tree" { return ops.treeHttps; } // Alias
345
- / "treehttp" { return ops.treeHttp; }
346
- / "treehttps" { return ops.treeHttps; }
344
+ / "treehttps" { return ops.treeHttps; } // Must come before `treehttp`
345
+ / "treehttp" { return ops.treeHttp; } // Must come before `tree`
346
+ / "tree" { return ops.treeHttps; }
347
347
 
348
348
  scopeReference "scope reference"
349
349
  = key:identifier {
@@ -227,14 +227,14 @@ function peg$parse(input, options) {
227
227
  var peg$c30 = "\r\n";
228
228
  var peg$c31 = "\r";
229
229
  var peg$c32 = "{";
230
- var peg$c33 = "haskeys";
230
+ var peg$c33 = "explore";
231
231
  var peg$c34 = "https";
232
232
  var peg$c35 = "http";
233
233
  var peg$c36 = "new";
234
234
  var peg$c37 = "package";
235
- var peg$c38 = "tree";
235
+ var peg$c38 = "treehttps";
236
236
  var peg$c39 = "treehttp";
237
- var peg$c40 = "treehttps";
237
+ var peg$c40 = "tree";
238
238
  var peg$c41 = ",";
239
239
  var peg$c42 = "#!";
240
240
  var peg$c43 = "\u2192";
@@ -318,14 +318,14 @@ function peg$parse(input, options) {
318
318
  var peg$e65 = peg$otherExpectation("function call using protocol: syntax");
319
319
  var peg$e66 = peg$otherExpectation("protocol");
320
320
  var peg$e67 = peg$otherExpectation("reserved protocol");
321
- var peg$e68 = peg$literalExpectation("haskeys", false);
321
+ var peg$e68 = peg$literalExpectation("explore", false);
322
322
  var peg$e69 = peg$literalExpectation("https", false);
323
323
  var peg$e70 = peg$literalExpectation("http", false);
324
324
  var peg$e71 = peg$literalExpectation("new", false);
325
325
  var peg$e72 = peg$literalExpectation("package", false);
326
- var peg$e73 = peg$literalExpectation("tree", false);
326
+ var peg$e73 = peg$literalExpectation("treehttps", false);
327
327
  var peg$e74 = peg$literalExpectation("treehttp", false);
328
- var peg$e75 = peg$literalExpectation("treehttps", false);
328
+ var peg$e75 = peg$literalExpectation("tree", false);
329
329
  var peg$e76 = peg$otherExpectation("scope reference");
330
330
  var peg$e77 = peg$literalExpectation(",", false);
331
331
  var peg$e78 = peg$literalExpectation("#!", false);
@@ -465,7 +465,7 @@ function peg$parse(input, options) {
465
465
  var peg$f43 = function(protocol, host, path) {
466
466
  return annotate([protocol, host, ...(path ?? [])], location());
467
467
  };
468
- var peg$f44 = function() { return ops.openSite; };
468
+ var peg$f44 = function() { return ops.explorableSite; };
469
469
  var peg$f45 = function() { return ops.https; };
470
470
  var peg$f46 = function() { return ops.http; };
471
471
  var peg$f47 = function() { return ops.constructor; };
@@ -2811,9 +2811,9 @@ function peg$parse(input, options) {
2811
2811
  s0 = s1;
2812
2812
  if (s0 === peg$FAILED) {
2813
2813
  s0 = peg$currPos;
2814
- if (input.substr(peg$currPos, 4) === peg$c38) {
2814
+ if (input.substr(peg$currPos, 9) === peg$c38) {
2815
2815
  s1 = peg$c38;
2816
- peg$currPos += 4;
2816
+ peg$currPos += 9;
2817
2817
  } else {
2818
2818
  s1 = peg$FAILED;
2819
2819
  if (peg$silentFails === 0) { peg$fail(peg$e73); }
@@ -2839,9 +2839,9 @@ function peg$parse(input, options) {
2839
2839
  s0 = s1;
2840
2840
  if (s0 === peg$FAILED) {
2841
2841
  s0 = peg$currPos;
2842
- if (input.substr(peg$currPos, 9) === peg$c40) {
2842
+ if (input.substr(peg$currPos, 4) === peg$c40) {
2843
2843
  s1 = peg$c40;
2844
- peg$currPos += 9;
2844
+ peg$currPos += 4;
2845
2845
  } else {
2846
2846
  s1 = peg$FAILED;
2847
2847
  if (peg$silentFails === 0) { peg$fail(peg$e75); }
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  import {
7
+ ExplorableSiteTree,
7
8
  ObjectTree,
8
- OpenSiteTree,
9
9
  SiteTree,
10
10
  Tree,
11
11
  isUnpackable,
@@ -285,16 +285,16 @@ export async function object(...entries) {
285
285
  object.toString = () => "«ops.object»";
286
286
 
287
287
  /**
288
- * An open tree with JSON Keys via HTTPS.
288
+ * A site tree with JSON Keys via HTTPS.
289
289
  *
290
290
  * @this {AsyncTree|null}
291
291
  * @param {string} host
292
292
  * @param {...string|Symbol} keys
293
293
  */
294
- export function openSite(host, ...keys) {
295
- return constructSiteTree("https:", OpenSiteTree, this, host, ...keys);
294
+ export function explorableSite(host, ...keys) {
295
+ return constructSiteTree("https:", ExplorableSiteTree, this, host, ...keys);
296
296
  }
297
- openSite.toString = () => "«ops.openSite»";
297
+ explorableSite.toString = () => "«ops.explorableSite»";
298
298
 
299
299
  /**
300
300
  * Look up the given key in the scope for the current tree.