@thi.ng/parse 2.6.19 → 2.6.21

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-07-17T15:09:00Z
3
+ - **Last updated**: 2025-07-21T08:21:58Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -460,24 +460,24 @@ const ctx = defContext(`
460
460
 
461
461
  // parse & print AST
462
462
  print(lang!.rules.expr)(ctx);
463
- // expr: null
464
- // list: null
465
- // expr: null
463
+ // expr: undefined
464
+ // list: undefined
465
+ // expr: undefined
466
466
  // sym: "def"
467
467
  // sym: "hello"
468
- // list: null
469
- // expr: null
468
+ // list: undefined
469
+ // expr: undefined
470
470
  // sym: "x"
471
- // list: null
472
- // expr: null
471
+ // list: undefined
472
+ // expr: undefined
473
473
  // sym: "str"
474
474
  // string: "hello, "
475
475
  // sym: "x"
476
- // list: null
477
- // expr: null
476
+ // list: undefined
477
+ // expr: undefined
478
478
  // sym: "print"
479
- // list: null
480
- // expr: null
479
+ // list: undefined
480
+ // expr: undefined
481
481
  // sym: "hello"
482
482
  // real: 42
483
483
 
@@ -487,8 +487,8 @@ print(lang!.rules.expr)(ctx);
487
487
  // the two top-level s-expressions...
488
488
  console.log(ctx.children);
489
489
  // [
490
- // { id: 'list', state: null, children: [ [Object] ], result: null },
491
- // { id: 'list', state: null, children: [ [Object] ], result: null }
490
+ // ParseScope { id: 'list', state: null, children: [ [Object] ], result: undefined, ... },
491
+ // ParseScope { id: 'list', state: null, children: [ [Object] ], result: undefined, ... }
492
492
  // ]
493
493
  ```
494
494
 
@@ -43,7 +43,7 @@ import type { Parser } from "../api.js";
43
43
  * // "ababaa"
44
44
  *
45
45
  * console.log(ctx.state);
46
- * // { p: 6, l: 1, c: 7, done: false, last: 'a' }
46
+ * // { p: 6, l: 1, c: 7, done: false }
47
47
  * ```
48
48
  *
49
49
  * @example
@@ -62,7 +62,7 @@ import type { Parser } from "../api.js";
62
62
  * // "ababaaabba"
63
63
  *
64
64
  * console.log(ctx.state);
65
- * // { p: 10, l: 1, c: 11, done: false, last: 'a' }
65
+ * // { p: 10, l: 1, c: 11, done: false }
66
66
  * ```
67
67
  *
68
68
  * @param parser -
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/parse",
3
- "version": "2.6.19",
3
+ "version": "2.6.21",
4
4
  "description": "Purely functional parser combinators & AST generation for generic inputs",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,14 +39,14 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.11.30",
43
- "@thi.ng/checks": "^3.7.10",
44
- "@thi.ng/defmulti": "^3.0.70",
45
- "@thi.ng/errors": "^2.5.36",
46
- "@thi.ng/strings": "^3.9.16"
42
+ "@thi.ng/api": "^8.11.32",
43
+ "@thi.ng/checks": "^3.7.12",
44
+ "@thi.ng/defmulti": "^3.0.72",
45
+ "@thi.ng/errors": "^2.5.38",
46
+ "@thi.ng/strings": "^3.9.18"
47
47
  },
48
48
  "devDependencies": {
49
- "esbuild": "^0.25.6",
49
+ "esbuild": "^0.25.8",
50
50
  "typedoc": "^0.28.7",
51
51
  "typescript": "^5.8.3"
52
52
  },
@@ -246,5 +246,5 @@
246
246
  ],
247
247
  "year": 2020
248
248
  },
249
- "gitHead": "4e98c38a817045d0e9a5b8bb6da23c00a721c3e0\n"
249
+ "gitHead": "11747c482773d3da03c8b7848b25a56251ccd759\n"
250
250
  }
package/prims/skip.d.ts CHANGED
@@ -18,7 +18,7 @@ import type { Parser } from "../api.js";
18
18
  * // true
19
19
  *
20
20
  * console.log(ctx.state);
21
- * // { p: 15, l: 2, c: 1, done: true, last: '\n' }
21
+ * // { p: 15, l: 2, c: 1, done: true }
22
22
  * ```
23
23
  *
24
24
  * @param pred -
package/xform/print.d.ts CHANGED
@@ -22,9 +22,9 @@ export declare const xfPrint: (fn?: Fn<string, void>) => ScopeTransform<any>;
22
22
  * import { ALPHA, defContext, lit, oneOrMore, print, seq } from "@thi.ng/parse";
23
23
  *
24
24
  * print(seq([lit("["), oneOrMore(ALPHA), lit("]")]))(defContext("[abc]"));
25
- * // seq: null
25
+ * // seq: undefined
26
26
  * // lit: "["
27
- * // repeat1: null
27
+ * // repeat1: undefined
28
28
  * // oneOf: "a"
29
29
  * // oneOf: "b"
30
30
  * // oneOf: "c"