@thi.ng/parse 2.2.17 → 2.2.19
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 +1 -1
- package/README.md +8 -11
- package/api.d.ts +8 -8
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
|
|
3
|
-
# 
|
|
3
|
+
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/parse)
|
|
6
6
|

|
|
7
|
-
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
This project is part of the
|
|
10
10
|
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
|
|
@@ -40,7 +40,7 @@ This project is part of the
|
|
|
40
40
|
|
|
41
41
|
## About
|
|
42
42
|
|
|
43
|
-
Purely functional parser combinators & AST generation for generic inputs
|
|
43
|
+
Purely functional parser combinators & AST generation for generic inputs
|
|
44
44
|
|
|
45
45
|
### Features
|
|
46
46
|
|
|
@@ -83,14 +83,11 @@ ES module import:
|
|
|
83
83
|
|
|
84
84
|
For Node.js REPL:
|
|
85
85
|
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
node --experimental-repl-await
|
|
89
|
-
|
|
90
|
-
> const parse = await import("@thi.ng/parse");
|
|
86
|
+
```js
|
|
87
|
+
const parse = await import("@thi.ng/parse");
|
|
91
88
|
```
|
|
92
89
|
|
|
93
|
-
Package sizes (
|
|
90
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 5.07 KB
|
|
94
91
|
|
|
95
92
|
## Dependencies
|
|
96
93
|
|
|
@@ -560,7 +557,7 @@ console.log(stack);
|
|
|
560
557
|
|
|
561
558
|
## Authors
|
|
562
559
|
|
|
563
|
-
Karsten Schmidt
|
|
560
|
+
- [Karsten Schmidt](https://thi.ng)
|
|
564
561
|
|
|
565
562
|
If this project contributes to an academic publication, please cite it as:
|
|
566
563
|
|
|
@@ -575,4 +572,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
575
572
|
|
|
576
573
|
## License
|
|
577
574
|
|
|
578
|
-
© 2020 - 2022 Karsten Schmidt // Apache
|
|
575
|
+
© 2020 - 2022 Karsten Schmidt // Apache License 2.0
|
package/api.d.ts
CHANGED
|
@@ -19,16 +19,16 @@ export interface IReader<T> {
|
|
|
19
19
|
isDone(state: ParseState<T>): boolean;
|
|
20
20
|
format(state: ParseState<T>): string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type Parser<T> = Fn<ParseContext<T>, boolean>;
|
|
23
|
+
export type LitParser<T> = Parser<T> & {
|
|
24
24
|
__lit: true;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type DynamicParser<T> = Parser<T> & {
|
|
27
27
|
set: Fn<Parser<T>, void>;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
29
|
+
export type PassValue<T> = T | Fn0<T>;
|
|
30
|
+
export type CharSet = IObjectOf<boolean>;
|
|
31
|
+
export type ScopeTransform<T> = (scope: Nullable<ParseScope<T>>, ctx: ParseContext<T>, user?: any) => Nullable<ParseScope<T>>;
|
|
32
32
|
export interface GrammarOpts {
|
|
33
33
|
/**
|
|
34
34
|
* If true, prints AST and verbose compiler output.
|
|
@@ -44,8 +44,8 @@ export interface GrammarOpts {
|
|
|
44
44
|
*/
|
|
45
45
|
optimize: boolean;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
48
|
-
export
|
|
47
|
+
export type Rules = IObjectOf<Parser<string>>;
|
|
48
|
+
export type RuleTransforms = IObjectOf<ScopeTransform<string>>;
|
|
49
49
|
export interface Language {
|
|
50
50
|
grammar: ParseContext<string>;
|
|
51
51
|
env: RuleTransforms;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/parse",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.19",
|
|
4
4
|
"description": "Purely functional parser combinators & AST generation for generic inputs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://patreon.com/thing_umbrella"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
|
-
"author": "Karsten Schmidt
|
|
24
|
+
"author": "Karsten Schmidt (https://thi.ng)",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && tsc --declaration",
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/checks": "^3.3.
|
|
39
|
-
"@thi.ng/defmulti": "^2.1.
|
|
40
|
-
"@thi.ng/errors": "^2.2.
|
|
41
|
-
"@thi.ng/strings": "^3.3.
|
|
37
|
+
"@thi.ng/api": "^8.6.0",
|
|
38
|
+
"@thi.ng/checks": "^3.3.5",
|
|
39
|
+
"@thi.ng/defmulti": "^2.1.24",
|
|
40
|
+
"@thi.ng/errors": "^2.2.6",
|
|
41
|
+
"@thi.ng/strings": "^3.3.20"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@microsoft/api-extractor": "^7.33.
|
|
45
|
-
"@thi.ng/testament": "^0.3.
|
|
44
|
+
"@microsoft/api-extractor": "^7.33.7",
|
|
45
|
+
"@thi.ng/testament": "^0.3.7",
|
|
46
46
|
"rimraf": "^3.0.2",
|
|
47
47
|
"tools": "^0.0.1",
|
|
48
|
-
"typedoc": "^0.23.
|
|
49
|
-
"typescript": "^4.
|
|
48
|
+
"typedoc": "^0.23.22",
|
|
49
|
+
"typescript": "^4.9.4"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"ast",
|
|
@@ -241,5 +241,5 @@
|
|
|
241
241
|
],
|
|
242
242
|
"year": 2020
|
|
243
243
|
},
|
|
244
|
-
"gitHead": "
|
|
244
|
+
"gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
|
|
245
245
|
}
|