astn-core 0.5.141 → 0.5.142
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/dist/_implementation/refiners/unmarshalled/parse_tree.d.ts +1 -1
- package/dist/_implementation/serializers/unmarshalling.d.ts +1 -1
- package/dist/_implementation/serializers/unmarshalling_from_parse_tree.d.ts +1 -1
- package/dist/_implementation/transformers/unmarshalling/location.d.ts +1 -1
- package/dist/_implementation/transformers/unmarshalling/location.js +2 -11
- package/dist/_implementation/transformers/{unmarshalling_from_parse_tree → unmarshalling_deprecated}/location.d.ts +2 -2
- package/dist/_implementation/transformers/unmarshalling_deprecated/location.js +12 -0
- package/dist/interface/api.d.ts +7 -7
- package/dist/interface/schemas/unmarshalling.d.ts +23 -5
- package/dist/interface/schemas/unmarshalling.js +2 -2
- package/dist/interface/schemas/unmarshalling_deprecated.d.ts +5 -0
- package/dist/interface/schemas/unmarshalling_deprecated.js +2 -0
- package/package.json +1 -1
- package/dist/_implementation/transformers/unmarshalling_from_parse_tree/location.js +0 -3
- package/dist/interface/schemas/unmarshalling_from_parse_tree.d.ts +0 -23
- package/dist/interface/schemas/unmarshalling_from_parse_tree.js +0 -2
|
@@ -2,7 +2,7 @@ import * as p_ from 'pareto-core/implementation/refiner';
|
|
|
2
2
|
import type * as p_di from 'pareto-core/interface/schema';
|
|
3
3
|
import type * as s_out from "../../../interface/schemas/unmarshalled.js";
|
|
4
4
|
import type * as s_in from "../../../interface/schemas/parse_tree.js";
|
|
5
|
-
import type * as s_function from "../../../interface/schemas/
|
|
5
|
+
import type * as s_function from "../../../interface/schemas/unmarshalling.js";
|
|
6
6
|
declare namespace declarations {
|
|
7
7
|
type Dictionary = p_.Refiner<s_out.Dictionary, s_function.Error, s_in.Value>;
|
|
8
8
|
type List = p_.Refiner<s_out.List, s_function.Error, s_in.Value>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/serializer';
|
|
2
|
-
import type * as s_in from "../../interface/schemas/
|
|
2
|
+
import type * as s_in from "../../interface/schemas/unmarshalling_deprecated.js";
|
|
3
3
|
declare namespace declarations {
|
|
4
4
|
type Error = p_.Serializer<s_in.Error>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/serializer';
|
|
2
|
-
import type * as s_in from "../../interface/schemas/
|
|
2
|
+
import type * as s_in from "../../interface/schemas/unmarshalling.js";
|
|
3
3
|
declare namespace declarations {
|
|
4
4
|
type Error = p_.Serializer<s_in.Error>;
|
|
5
5
|
}
|
|
@@ -2,7 +2,7 @@ import * as p_ from 'pareto-core/implementation/transformer';
|
|
|
2
2
|
import type * as s_in from "../../../interface/schemas/unmarshalling.js";
|
|
3
3
|
import type * as s_out from "../../../interface/schemas/location.js";
|
|
4
4
|
declare namespace declarations {
|
|
5
|
-
type Error = p_.Transformer<s_in.Error, s_out.
|
|
5
|
+
type Error = p_.Transformer<s_in.Error, s_out.Range>;
|
|
6
6
|
}
|
|
7
7
|
export declare const Error: declarations.Error;
|
|
8
8
|
export {};
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/transformer';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as t_unmarshall_to_location from "../unmarshalling_from_parse_tree/location.js";
|
|
5
|
-
export const Error = ($) => p_.from.state($).decide(($) => {
|
|
6
|
-
switch ($[0]) {
|
|
7
|
-
case 'deserialize': return p_.option($, ($) => t_deserialize_parse_tree_to_location.Error($));
|
|
8
|
-
case 'unmarshall parse tree': return p_.option($, ($) => ['range', t_unmarshall_to_location.Error($)]);
|
|
9
|
-
default: return p_.exhaustive($[0]);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8u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|
|
2
|
+
export const Error = ($) => $.range;
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvX2ltcGxlbWVudGF0aW9uL3RyYW5zZm9ybWVycy91bm1hcnNoYWxsaW5nL2xvY2F0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0sd0NBQXdDLENBQUE7QUFhNUQsTUFBTSxDQUFDLE1BQU0sS0FBSyxHQUF1QixDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQSJ9
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/transformer';
|
|
2
|
-
import type * as s_in from "../../../interface/schemas/
|
|
2
|
+
import type * as s_in from "../../../interface/schemas/unmarshalling_deprecated.js";
|
|
3
3
|
import type * as s_out from "../../../interface/schemas/location.js";
|
|
4
4
|
declare namespace declarations {
|
|
5
|
-
type Error = p_.Transformer<s_in.Error, s_out.
|
|
5
|
+
type Error = p_.Transformer<s_in.Error, s_out.Possible_Range>;
|
|
6
6
|
}
|
|
7
7
|
export declare const Error: declarations.Error;
|
|
8
8
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as p_ from 'pareto-core/implementation/transformer';
|
|
2
|
+
//dependencies
|
|
3
|
+
import * as t_deserialize_parse_tree_to_location from "../parse_tree_deserialization/location.js";
|
|
4
|
+
import * as t_unmarshall_to_location from "../unmarshalling/location.js";
|
|
5
|
+
export const Error = ($) => p_.from.state($).decide(($) => {
|
|
6
|
+
switch ($[0]) {
|
|
7
|
+
case 'deserialize': return p_.option($, ($) => t_deserialize_parse_tree_to_location.Error($));
|
|
8
|
+
case 'unmarshall parse tree': return p_.option($, ($) => ['range', t_unm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x3QkFBd0IsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO1FBQ3RHLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN2QyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUEifQ==
|
package/dist/interface/api.d.ts
CHANGED
|
@@ -37,13 +37,13 @@ export type API = {
|
|
|
37
37
|
};
|
|
38
38
|
'unmarshalled': {
|
|
39
39
|
'parse tree': {
|
|
40
|
-
'Dictionary': p_r.Refiner<import("./schemas/unmarshalled.js").Dictionary, import("./schemas/
|
|
41
|
-
'List': p_r.Refiner<import("./schemas/unmarshalled.js").List, import("./schemas/
|
|
42
|
-
'Nothing': p_r.Refiner<import("./schemas/unmarshalled.js").Nothing, import("./schemas/
|
|
43
|
-
'Optional': p_r.Refiner<import("./schemas/unmarshalled.js").Optional, import("./schemas/
|
|
44
|
-
'State': p_r.Refiner<import("./schemas/unmarshalled.js").State, import("./schemas/
|
|
45
|
-
'Text': p_r.Refiner<import("./schemas/unmarshalled.js").Text, import("./schemas/
|
|
46
|
-
'Verbose Group': p_r.Refiner_With_Parameter<import("./schemas/unmarshalled.js").Verbose_Group, import("./schemas/
|
|
40
|
+
'Dictionary': p_r.Refiner<import("./schemas/unmarshalled.js").Dictionary, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value>;
|
|
41
|
+
'List': p_r.Refiner<import("./schemas/unmarshalled.js").List, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value>;
|
|
42
|
+
'Nothing': p_r.Refiner<import("./schemas/unmarshalled.js").Nothing, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value>;
|
|
43
|
+
'Optional': p_r.Refiner<import("./schemas/unmarshalled.js").Optional, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value>;
|
|
44
|
+
'State': p_r.Refiner<import("./schemas/unmarshalled.js").State, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value>;
|
|
45
|
+
'Text': p_r.Refiner<import("./schemas/unmarshalled.js").Text, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value>;
|
|
46
|
+
'Verbose Group': p_r.Refiner_With_Parameter<import("./schemas/unmarshalled.js").Verbose_Group, import("./schemas/unmarshalling.js").Error, import("./schemas/parse_tree.js").Value, import("./schemas/unmarshalling.js").Verbose_Group_Parameters>;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
};
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type * as
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as p_ from 'pareto-core/interface/schema';
|
|
2
|
+
import type * as s_location from "./location.js";
|
|
3
|
+
export type Error = {
|
|
4
|
+
'type': Error_Type;
|
|
5
|
+
'range': s_location.Range;
|
|
6
|
+
};
|
|
7
|
+
export type Error_Type = ['dictionary', Dictionary_Error] | ['type', Type_Error] | [
|
|
8
|
+
'wrong value type',
|
|
9
|
+
{
|
|
10
|
+
'expected': ['dictionary', null] | ['verbose group', null] | ['list', null] | ['nothing', null] | ['optional', null] | ['state', null] | ['text', null];
|
|
11
|
+
}
|
|
12
|
+
];
|
|
13
|
+
export type Dictionary_Error = ['duplicate entry', string];
|
|
14
|
+
export type Type_Error = ['duplicate property', string] | [
|
|
15
|
+
'unexpected properties',
|
|
16
|
+
{
|
|
17
|
+
'found': p_.Dictionary<s_location.Range>;
|
|
18
|
+
'expected': p_.Dictionary<null>;
|
|
19
|
+
}
|
|
20
|
+
] | ['missing property', string];
|
|
21
|
+
export type Verbose_Group_Parameters = {
|
|
22
|
+
'expected properties': p_.Dictionary<null>;
|
|
23
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import * as p_ from 'pareto-core/interface/schema';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5tYXJzaGFsbGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9pbnRlcmZhY2Uvc2NoZW1hcy91bm1hcnNoYWxsaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0sOEJBQThCLENBQUEifQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as s_deserialize_parse_tree from "./parse_tree_deserialization.js";
|
|
2
|
+
import type * as s_unmarshalling_from_parse_tree from "./unmarshalling.js";
|
|
3
|
+
export type Error_ = ['deserialize', s_deserialize_parse_tree.Error] | ['unmarshall parse tree', s_unmarshalling_from_parse_tree.Error];
|
|
4
|
+
export type { Error_ as Error, };
|
|
5
|
+
export type Parameters = s_deserialize_parse_tree.Parameters;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5tYXJzaGFsbGluZ19kZXByZWNhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ludGVyZmFjZS9zY2hlbWFzL3VubWFyc2hhbGxpbmdfZGVwcmVjYXRlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astn-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.142",
|
|
4
4
|
"author": "Corno",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "The TypeScript library for parsing and formatting ASTN (Abstract Syntax Tree Notation) - a human-editable data format for structured content",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import * as p_ from 'pareto-core/implementation/transformer';
|
|
2
|
-
export const Error = ($) => $.range;
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvX2ltcGxlbWVudGF0aW9uL3RyYW5zZm9ybWVycy91bm1hcnNoYWxsaW5nX2Zyb21fcGFyc2VfdHJlZS9sb2NhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxNQUFNLHdDQUF3QyxDQUFBO0FBYTVELE1BQU0sQ0FBQyxNQUFNLEtBQUssR0FBdUIsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUEifQ==
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as p_ from 'pareto-core/interface/schema';
|
|
2
|
-
import type * as s_location from "./location.js";
|
|
3
|
-
export type Error = {
|
|
4
|
-
'type': Error_Type;
|
|
5
|
-
'range': s_location.Range;
|
|
6
|
-
};
|
|
7
|
-
export type Error_Type = ['dictionary', Dictionary_Error] | ['type', Type_Error] | [
|
|
8
|
-
'wrong value type',
|
|
9
|
-
{
|
|
10
|
-
'expected': ['dictionary', null] | ['verbose group', null] | ['list', null] | ['nothing', null] | ['optional', null] | ['state', null] | ['text', null];
|
|
11
|
-
}
|
|
12
|
-
];
|
|
13
|
-
export type Dictionary_Error = ['duplicate entry', string];
|
|
14
|
-
export type Type_Error = ['duplicate property', string] | [
|
|
15
|
-
'unexpected properties',
|
|
16
|
-
{
|
|
17
|
-
'found': p_.Dictionary<s_location.Range>;
|
|
18
|
-
'expected': p_.Dictionary<null>;
|
|
19
|
-
}
|
|
20
|
-
] | ['missing property', string];
|
|
21
|
-
export type Verbose_Group_Parameters = {
|
|
22
|
-
'expected properties': p_.Dictionary<null>;
|
|
23
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import * as p_ from 'pareto-core/interface/schema';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5tYXJzaGFsbGluZ19mcm9tX3BhcnNlX3RyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW50ZXJmYWNlL3NjaGVtYXMvdW5tYXJzaGFsbGluZ19mcm9tX3BhcnNlX3RyZWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQSJ9
|