astn-core 0.5.149 → 0.5.151
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/api.js +61 -49
- package/dist/interface/api.d.ts +48 -36
- package/dist/{_implementation → modules/deserialization/implementation}/refiners/annotated_characters/list_of_characters.d.ts +3 -3
- package/dist/modules/deserialization/implementation/refiners/annotated_characters/list_of_characters.js +68 -0
- package/dist/{_implementation → modules/deserialization/implementation}/refiners/parse_tree/list_of_characters.d.ts +3 -3
- package/dist/modules/deserialization/implementation/refiners/parse_tree/list_of_characters.js +23 -0
- package/dist/{_implementation → modules/deserialization/implementation}/refiners/parse_tree/tokenizer_result.d.ts +5 -5
- package/dist/modules/deserialization/implementation/refiners/parse_tree/tokenizer_result.js +211 -0
- package/dist/{_implementation → modules/deserialization/implementation}/refiners/token/annotated_character.d.ts +4 -4
- package/dist/{_implementation → modules/deserialization/implementation}/refiners/token/annotated_character.js +1 -1
- package/dist/{_implementation → modules/deserialization/implementation}/serializers/location.d.ts +2 -2
- package/dist/modules/deserialization/implementation/serializers/location.js +33 -0
- package/dist/{_implementation → modules/deserialization/implementation}/serializers/parse_tree_deserialization.d.ts +1 -1
- package/dist/modules/deserialization/implementation/serializers/parse_tree_deserialization.js +63 -0
- package/dist/{_implementation → modules/deserialization/implementation}/transformers/parse_tree/full_value_range.d.ts +2 -2
- package/dist/modules/deserialization/implementation/transformers/parse_tree/full_value_range.js +70 -0
- package/dist/{_implementation → modules/deserialization/implementation}/transformers/parse_tree/start_token_range.d.ts +2 -2
- package/dist/modules/deserialization/implementation/transformers/parse_tree/start_token_range.js +34 -0
- package/dist/{_implementation/transformers/unmarshalling_deprecated → modules/deserialization/implementation/transformers/parse_tree_deserialization}/location.d.ts +2 -2
- package/dist/modules/deserialization/implementation/transformers/parse_tree_deserialization/location.js +20 -0
- package/dist/{private_schemas → modules/deserialization/schemas}/annotated_characters.d.ts +1 -1
- package/dist/modules/deserialization/schemas/annotated_characters.js +2 -0
- package/dist/modules/deserialization/schemas/full_value_range.js +2 -0
- package/dist/modules/deserialization/schemas/list_of_characters.js +2 -0
- package/dist/{interface → modules/deserialization}/schemas/location.js +1 -1
- package/dist/modules/deserialization/schemas/location_serialization.js +2 -0
- package/dist/{interface → modules/deserialization}/schemas/parse_tree.js +1 -1
- package/dist/modules/deserialization/schemas/parse_tree_deserialization.js +4 -0
- package/dist/modules/deserialization/schemas/start_token_range.js +2 -0
- package/dist/{interface → modules/deserialization}/schemas/token.js +1 -1
- package/dist/{_implementation → modules/serialization/implementation}/serializers/primitives.d.ts +1 -1
- package/dist/modules/serialization/implementation/serializers/primitives.js +87 -0
- package/dist/{_implementation → modules/serialization/implementation}/transformers/sealed_target/paragraph.d.ts +2 -2
- package/dist/modules/serialization/implementation/transformers/sealed_target/paragraph.js +88 -0
- package/dist/{_implementation/transformers/sealed_target/paragraph_lines.d.ts → modules/serialization/implementation/transformers/sealed_target/serialized_paragraph.d.ts} +2 -2
- package/dist/modules/serialization/implementation/transformers/sealed_target/serialized_paragraph.js +6 -0
- package/dist/{interface → modules/serialization}/schemas/paragraph.js +1 -1
- package/dist/{interface → modules/serialization}/schemas/paragraph_serialization.js +1 -1
- package/dist/{private_schemas → modules/serialization/schemas}/primitives.js +1 -1
- package/dist/{interface → modules/serialization}/schemas/sealed_target.js +1 -1
- package/dist/modules/serialization/schemas/serialized_paragraph.d.ts +1 -0
- package/dist/modules/serialization/schemas/serialized_paragraph.js +2 -0
- package/dist/{_implementation → modules/unmarshalling/implementation}/refiners/unmarshalled/parse_tree.d.ts +3 -3
- package/dist/modules/unmarshalling/implementation/refiners/unmarshalled/parse_tree.js +253 -0
- package/dist/{_implementation → modules/unmarshalling/implementation}/serializers/unmarshalling_deprecated.d.ts +1 -1
- package/dist/modules/unmarshalling/implementation/serializers/unmarshalling_deprecated.js +12 -0
- package/dist/{_implementation → modules/unmarshalling/implementation}/serializers/value_unmarshalling.d.ts +1 -1
- package/dist/modules/unmarshalling/implementation/serializers/value_unmarshalling.js +74 -0
- package/dist/{_implementation/transformers/parse_tree_deserialization → modules/unmarshalling/implementation/transformers/unmarshalling_deprecated}/location.d.ts +2 -2
- package/dist/modules/unmarshalling/implementation/transformers/unmarshalling_deprecated/location.js +12 -0
- package/dist/{_implementation → modules/unmarshalling/implementation}/transformers/value_unmarshalling/location.d.ts +2 -2
- package/dist/modules/unmarshalling/implementation/transformers/value_unmarshalling/location.js +3 -0
- package/dist/modules/unmarshalling/schemas/parse_tree.d.ts +1 -0
- package/dist/modules/unmarshalling/schemas/parse_tree.js +2 -0
- package/dist/{interface → modules/unmarshalling}/schemas/unmarshalled_value.d.ts +1 -1
- package/dist/modules/unmarshalling/schemas/unmarshalled_value.js +2 -0
- package/dist/{interface → modules/unmarshalling}/schemas/unmarshalling_deprecated.d.ts +1 -1
- package/dist/modules/unmarshalling/schemas/unmarshalling_deprecated.js +2 -0
- package/dist/{interface → modules/unmarshalling}/schemas/value_unmarshalling.d.ts +1 -1
- package/dist/modules/unmarshalling/schemas/value_unmarshalling.js +2 -0
- package/package.json +1 -1
- package/dist/_implementation/refiners/annotated_characters/list_of_characters.js +0 -68
- package/dist/_implementation/refiners/parse_tree/list_of_characters.js +0 -23
- package/dist/_implementation/refiners/parse_tree/tokenizer_result.js +0 -211
- package/dist/_implementation/refiners/unmarshalled/parse_tree.js +0 -253
- package/dist/_implementation/serializers/location.js +0 -33
- package/dist/_implementation/serializers/parse_tree_deserialization.js +0 -63
- package/dist/_implementation/serializers/primitives.js +0 -87
- package/dist/_implementation/serializers/unmarshalling_deprecated.js +0 -12
- package/dist/_implementation/serializers/value_unmarshalling.js +0 -74
- package/dist/_implementation/transformers/parse_tree/full_value_range.js +0 -70
- package/dist/_implementation/transformers/parse_tree/start_token_range.js +0 -34
- package/dist/_implementation/transformers/parse_tree_deserialization/location.js +0 -20
- package/dist/_implementation/transformers/sealed_target/paragraph.js +0 -88
- package/dist/_implementation/transformers/sealed_target/paragraph_lines.js +0 -6
- package/dist/_implementation/transformers/unmarshalling_deprecated/location.js +0 -12
- package/dist/_implementation/transformers/value_unmarshalling/location.js +0 -3
- package/dist/interface/schemas/full_value_range.js +0 -2
- package/dist/interface/schemas/list_of_characters.js +0 -2
- package/dist/interface/schemas/location_serialization.js +0 -2
- package/dist/interface/schemas/paragraph_lines.d.ts +0 -1
- package/dist/interface/schemas/paragraph_lines.js +0 -2
- package/dist/interface/schemas/parse_tree_deserialization.js +0 -4
- package/dist/interface/schemas/start_token_range.js +0 -2
- package/dist/interface/schemas/unmarshalled_value.js +0 -2
- package/dist/interface/schemas/unmarshalling_deprecated.js +0 -2
- package/dist/interface/schemas/value_unmarshalling.js +0 -2
- package/dist/private_schemas/annotated_characters.js +0 -2
- /package/dist/{interface → modules/deserialization}/schemas/full_value_range.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/list_of_characters.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/location.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/location_serialization.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/parse_tree.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/parse_tree_deserialization.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/start_token_range.d.ts +0 -0
- /package/dist/{interface → modules/deserialization}/schemas/token.d.ts +0 -0
- /package/dist/{interface → modules/serialization}/schemas/paragraph.d.ts +0 -0
- /package/dist/{interface → modules/serialization}/schemas/paragraph_serialization.d.ts +0 -0
- /package/dist/{private_schemas → modules/serialization/schemas}/primitives.d.ts +0 -0
- /package/dist/{interface → modules/serialization}/schemas/sealed_target.d.ts +0 -0
package/dist/api.js
CHANGED
|
@@ -1,63 +1,75 @@
|
|
|
1
1
|
import * as interface_ from "./interface/api.js";
|
|
2
|
-
import * as r_parse_tree_from_list_of_characters from "./
|
|
3
|
-
import * as r_unmarshalled_from_parse_tree from "./
|
|
4
|
-
import * as ser_deserialize_parse_tree from "./
|
|
5
|
-
import * as ser_location from "./
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
2
|
+
import * as r_parse_tree_from_list_of_characters from "./modules/deserialization/implementation/refiners/parse_tree/list_of_characters.js";
|
|
3
|
+
import * as r_unmarshalled_from_parse_tree from "./modules/unmarshalling/implementation/refiners/unmarshalled/parse_tree.js";
|
|
4
|
+
import * as ser_deserialize_parse_tree from "./modules/deserialization/implementation/serializers/parse_tree_deserialization.js";
|
|
5
|
+
import * as ser_location from "./modules/deserialization/implementation/serializers/location.js";
|
|
6
|
+
import * as ser_value_unmarshalling from "./modules/unmarshalling/implementation/serializers/value_unmarshalling.js";
|
|
7
|
+
import * as t_parse_tree_deserialization_to_location from "./modules/deserialization/implementation/transformers/parse_tree_deserialization/location.js";
|
|
8
|
+
import * as t_parse_tree_to_full_value_range from "./modules/deserialization/implementation/transformers/parse_tree/full_value_range.js";
|
|
9
|
+
import * as t_parse_tree_to_start_token_range from "./modules/deserialization/implementation/transformers/parse_tree/start_token_range.js";
|
|
10
|
+
import * as t_sealed_target_to_paragraph_lines from "./modules/serialization/implementation/transformers/sealed_target/serialized_paragraph.js";
|
|
11
11
|
export const api = {
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
12
|
+
'deserialization': {
|
|
13
|
+
'serializers': {
|
|
14
|
+
'parse tree deserialization': {
|
|
15
|
+
'Error': ser_deserialize_parse_tree.Error,
|
|
16
|
+
},
|
|
17
|
+
'location': {
|
|
18
|
+
'Range': ser_location.Range,
|
|
19
|
+
'Possible Range': ser_location.Possible_Range,
|
|
20
|
+
},
|
|
15
21
|
},
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
|
|
22
|
+
'transformers': {
|
|
23
|
+
'parse tree': {
|
|
24
|
+
'full value range': {
|
|
25
|
+
'Value': t_parse_tree_to_full_value_range.Value,
|
|
26
|
+
},
|
|
27
|
+
'start token range': {
|
|
28
|
+
'Value': t_parse_tree_to_start_token_range.Value,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'parse tree deserialization': {
|
|
32
|
+
'location': {
|
|
33
|
+
'Error': t_parse_tree_deserialization_to_location.Error,
|
|
34
|
+
}
|
|
35
|
+
},
|
|
19
36
|
},
|
|
20
|
-
'
|
|
21
|
-
'
|
|
37
|
+
'refiners': {
|
|
38
|
+
'parse tree': {
|
|
39
|
+
'list of characters': {
|
|
40
|
+
'Document': r_parse_tree_from_list_of_characters.Document,
|
|
41
|
+
}
|
|
42
|
+
},
|
|
22
43
|
}
|
|
23
44
|
},
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
45
|
+
'serialization': {
|
|
46
|
+
'transformers': {
|
|
47
|
+
'sealed target': {
|
|
48
|
+
'serialized paragraph': {
|
|
49
|
+
'Document': t_sealed_target_to_paragraph_lines.Document,
|
|
50
|
+
}
|
|
28
51
|
},
|
|
29
|
-
'start token range': {
|
|
30
|
-
'Value': t_parse_tree_to_start_token_range.Value,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
'parse tree deserialization': {
|
|
34
|
-
'location': {
|
|
35
|
-
'Error': t_parse_tree_deserialization_to_location.Error,
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
'sealed target': {
|
|
39
|
-
'paragraph lines': {
|
|
40
|
-
'Document': t_sealed_target_to_paragraph_lines.Document,
|
|
41
|
-
}
|
|
42
52
|
},
|
|
43
53
|
},
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
54
|
+
'unmarshalling': {
|
|
55
|
+
'serializers': {
|
|
56
|
+
'value unmarshalling': {
|
|
57
|
+
'Error': ser_value_unmarshalling.Error,
|
|
48
58
|
}
|
|
49
59
|
},
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
'refiners': {
|
|
61
|
+
'unmarshalled value': {
|
|
62
|
+
'parse tree': {
|
|
63
|
+
'Dictionary': r_unmarshalled_from_parse_tree.Dictionary,
|
|
64
|
+
'State': r_unmarshalled_from_parse_tree.State,
|
|
65
|
+
'Verbose Group': r_unmarshalled_from_parse_tree.Verbose_Group,
|
|
66
|
+
'List': r_unmarshalled_from_parse_tree.List,
|
|
67
|
+
'Optional': r_unmarshalled_from_parse_tree.Optional,
|
|
68
|
+
'Nothing': r_unmarshalled_from_parse_tree.Nothing,
|
|
69
|
+
'Text': r_unmarshalled_from_parse_tree.Text,
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
72
|
}
|
|
61
|
-
}
|
|
73
|
+
},
|
|
62
74
|
};
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssVUFBVSxNQUFNLG9CQUFvQixDQUFBO0FBRWhELE9BQU8sS0FBSyxvQ0FBb0MsTUFBTSxvRkFBb0YsQ0FBQTtBQUMxSSxPQUFPLEtBQUssOEJBQThCLE1BQU0sNEVBQTRFLENBQUE7QUFDNUgsT0FBTyxLQUFLLDBCQUEwQixNQUFNLG9GQUFvRixDQUFBO0FBQ2hJLE9BQU8sS0FBSyxZQUFZLE1BQU0sa0VBQWtFLENBQUE7QUFDaEcsT0FBTyxLQUFLLHVCQUF1QixNQUFNLDJFQUEyRSxDQUFBO0FBQ3BILE9BQU8sS0FBSyx3Q0FBd0MsTUFBTSw4RkFBOEYsQ0FBQTtBQUN4SixPQUFPLEtBQUssZ0NBQWdDLE1BQU0sc0ZBQXNGLENBQUE7QUFDeEksT0FBTyxLQUFLLGlDQUF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sRUFBRTtnQkFDbkIsT0FBTyxFQUFFLHVCQUF1QixDQUFDLEtBQUs7YUFDekM7U0FFSjtRQUNELFVBQVUsRUFBRTtZQUNSLG9CQUFvQixFQUFFO2dCQUNsQixZQUFZLEVBQUU7b0JBQ1YsWUFBWSxFQUFFLDhCQUE4QixDQUFDLFVBQVU7b0JBQ3ZELE9BQU8sRUFBRSw4QkFBOEIsQ0FBQyxLQUFLO29CQUM3QyxlQUFlLEVBQUUsOEJBQThCLENBQUMsYUFBYTtvQkFDN0QsTUFBTSxFQUFFLDhCQUE4QixDQUFDLElBQUk7b0JBQzNDLFVBQVUsRUFBRSw4QkFBOEIsQ0FBQyxRQUFRO29CQUNuRCxTQUFTLEVBQUUsOEJBQThCLENBQUMsT0FBTztvQkFDakQsTUFBTSxFQUFFLDhCQUE4QixDQUFDLElBQUk7aUJBQzlDO2FBQ0o7U0FDSjtLQUNKO0NBQ0osQ0FBQSJ9
|
package/dist/interface/api.d.ts
CHANGED
|
@@ -2,53 +2,65 @@ import * as p_t from 'pareto-core/interface/transformer';
|
|
|
2
2
|
import * as p_r from 'pareto-core/interface/refiner';
|
|
3
3
|
import * as p_s from 'pareto-core/implementation/serializer';
|
|
4
4
|
export type API = {
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'Error': p_s.Serializer<import("./schemas/value_unmarshalling.js").Error>;
|
|
5
|
+
'deserialization': {
|
|
6
|
+
'serializers': {
|
|
7
|
+
'parse tree deserialization': {
|
|
8
|
+
'Error': p_s.Serializer<import("../modules/deserialization/schemas/parse_tree_deserialization.js").Error>;
|
|
9
|
+
};
|
|
10
|
+
'location': {
|
|
11
|
+
'Range': p_s.Serializer_With_Parameter<import("../modules/deserialization/schemas/location.js").Range, import("../modules/deserialization/schemas/location_serialization.js").Parameters>;
|
|
12
|
+
'Possible Range': p_s.Serializer_With_Parameter<import("../modules/deserialization/schemas/location.js").Possible_Range, import("../modules/deserialization/schemas/location_serialization.js").Parameters>;
|
|
13
|
+
};
|
|
15
14
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
'transformers': {
|
|
16
|
+
'parse tree': {
|
|
17
|
+
'full value range': {
|
|
18
|
+
'Value': p_t.Transformer<import("../modules/deserialization/schemas/parse_tree.js").Value, import("../modules/deserialization/schemas/full_value_range.js").Range>;
|
|
19
|
+
};
|
|
20
|
+
'start token range': {
|
|
21
|
+
'Value': p_t.Transformer<import("../modules/deserialization/schemas/parse_tree.js").Value, import("../modules/deserialization/schemas/start_token_range.js").Range>;
|
|
22
|
+
};
|
|
21
23
|
};
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
+
'parse tree deserialization': {
|
|
25
|
+
'location': {
|
|
26
|
+
'Error': p_t.Transformer<import("../modules/deserialization/schemas/parse_tree_deserialization.js").Error, import("../modules/deserialization/schemas/location.js").Possible_Range>;
|
|
27
|
+
};
|
|
24
28
|
};
|
|
25
29
|
};
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
30
|
+
'refiners': {
|
|
31
|
+
'parse tree': {
|
|
32
|
+
'list of characters': {
|
|
33
|
+
'Document': p_r.Refiner_With_Parameter<import("../modules/deserialization/schemas/parse_tree.js").Document, import("../modules/deserialization/schemas/parse_tree_deserialization.js").Error, import("../modules/deserialization/schemas/list_of_characters.js").List_Of_Characters, import("../modules/deserialization/schemas/parse_tree_deserialization.js").Parameters>;
|
|
34
|
+
};
|
|
29
35
|
};
|
|
30
36
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
};
|
|
38
|
+
'serialization': {
|
|
39
|
+
'transformers': {
|
|
40
|
+
'sealed target': {
|
|
41
|
+
'serialized paragraph': {
|
|
42
|
+
'Document': p_t.Transformer_With_Parameter<import("../modules/serialization/schemas/sealed_target.js").Document, import("../modules/serialization/schemas/serialized_paragraph.js").Lines, import("../modules/serialization/schemas/paragraph_serialization.js").Parameters>;
|
|
43
|
+
};
|
|
34
44
|
};
|
|
35
45
|
};
|
|
36
46
|
};
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
47
|
+
'unmarshalling': {
|
|
48
|
+
'serializers': {
|
|
49
|
+
'value unmarshalling': {
|
|
50
|
+
'Error': p_s.Serializer<import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error>;
|
|
41
51
|
};
|
|
42
52
|
};
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
'refiners': {
|
|
54
|
+
'unmarshalled value': {
|
|
55
|
+
'parse tree': {
|
|
56
|
+
'Dictionary': p_r.Refiner<import("../modules/unmarshalling/schemas/unmarshalled_value.js").Dictionary, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value>;
|
|
57
|
+
'List': p_r.Refiner<import("../modules/unmarshalling/schemas/unmarshalled_value.js").List, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value>;
|
|
58
|
+
'Nothing': p_r.Refiner<import("../modules/unmarshalling/schemas/unmarshalled_value.js").Nothing, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value>;
|
|
59
|
+
'Optional': p_r.Refiner<import("../modules/unmarshalling/schemas/unmarshalled_value.js").Optional, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value>;
|
|
60
|
+
'State': p_r.Refiner<import("../modules/unmarshalling/schemas/unmarshalled_value.js").State, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value>;
|
|
61
|
+
'Text': p_r.Refiner<import("../modules/unmarshalling/schemas/unmarshalled_value.js").Text, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value>;
|
|
62
|
+
'Verbose Group': p_r.Refiner_With_Parameter<import("../modules/unmarshalling/schemas/unmarshalled_value.js").Verbose_Group, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Error, import("../modules/unmarshalling/schemas/parse_tree.js").Value, import("../modules/unmarshalling/schemas/value_unmarshalling.js").Verbose_Group_Parameters>;
|
|
63
|
+
};
|
|
52
64
|
};
|
|
53
65
|
};
|
|
54
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/refiner';
|
|
2
|
-
import type * as s_out from "../../../
|
|
3
|
-
import type * as s_function from "../../../
|
|
4
|
-
import type * as s_in from "../../../
|
|
2
|
+
import type * as s_out from "../../../schemas/annotated_characters.js";
|
|
3
|
+
import type * as s_function from "../../../schemas/parse_tree_deserialization.js";
|
|
4
|
+
import type * as s_in from "../../../schemas/list_of_characters.js";
|
|
5
5
|
declare namespace declarations {
|
|
6
6
|
type Annotated_Characters = p_.Refiner_Without_Error_With_Parameter<s_out.Annotated_Characters, s_in.List_Of_Characters, s_function.Parameters>;
|
|
7
7
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as p_ from 'pareto-core/implementation/refiner';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a string iterator that allows iterating over characters in a string,
|
|
4
|
+
* while keeping track of line numbers, columns, and line indentation.
|
|
5
|
+
*/
|
|
6
|
+
export const Annotated_Characters = ($, $p) => p_.from.list($).map_with_state({
|
|
7
|
+
'location': {
|
|
8
|
+
'absolute': 0,
|
|
9
|
+
'relative': {
|
|
10
|
+
'line': 0,
|
|
11
|
+
'column': 0,
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
'line indentation': null,
|
|
15
|
+
'found carriage return before': false,
|
|
16
|
+
}, (value, state) => ({
|
|
17
|
+
'code': value,
|
|
18
|
+
'location': state.location,
|
|
19
|
+
'line indentation': state['line indentation'] !== null
|
|
20
|
+
? state['line indentation']
|
|
21
|
+
: state.location.relative.column,
|
|
22
|
+
}), (value, state) => {
|
|
23
|
+
return value.code === 0x0A /* line feed */
|
|
24
|
+
? {
|
|
25
|
+
'location': {
|
|
26
|
+
'absolute': state.location.absolute + 1,
|
|
27
|
+
'relative': {
|
|
28
|
+
'line': state.location.relative.line + 1,
|
|
29
|
+
'column': 0,
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
'line indentation': null,
|
|
33
|
+
'found carriage return before': false,
|
|
34
|
+
}
|
|
35
|
+
: state['found carriage return before']
|
|
36
|
+
? {
|
|
37
|
+
'location': {
|
|
38
|
+
'absolute': state.location.absolute + 1,
|
|
39
|
+
'relative': {
|
|
40
|
+
'line': state.location.relative.line + 1,
|
|
41
|
+
'column': 0,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
'line indentation': null,
|
|
45
|
+
'found carriage return before': false,
|
|
46
|
+
}
|
|
47
|
+
: {
|
|
48
|
+
'location': {
|
|
49
|
+
'absolute': state.location.absolute + 1,
|
|
50
|
+
'relative': {
|
|
51
|
+
'line': state.location.relative.line,
|
|
52
|
+
'column': state.location.relative.column + (value.code === 0x09 /* tab */
|
|
53
|
+
? $p['tab size']
|
|
54
|
+
: 1),
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
'line indentation': state['line indentation'] !== null
|
|
58
|
+
? state['line indentation']
|
|
59
|
+
: value.code === 0x20 /* space */ || value.code === 0x09 /* tab */
|
|
60
|
+
? null
|
|
61
|
+
: state.location.relative.column,
|
|
62
|
+
'found carriage return before': value.code === 0x0D /* carriage return */,
|
|
63
|
+
};
|
|
64
|
+
}, (final_list, final_state) => ({
|
|
65
|
+
'characters': final_list,
|
|
66
|
+
'end': final_state.location,
|
|
67
|
+
}));
|
|
68
|
+
//# s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JQUFJO3dCQUNwQyxRQUFRLEVBQUUsS0FBSyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsTUFBTSxHQUFHLENBQUMsS0FBSyxDQUFDLElBQUksS0FBSyxJQUFJLENBQUMsU0FBUzs0QkFDckUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxVQUFVLENBQUM7NEJBQ2hCLENBQUMsQ0FBQyxDQUFDLENBQUM7cUJBQ1g7aUJBQ0o7Z0JBQ0Qsa0JBQWtCLEVBQUUsS0FBSyxDQUFDLGtCQUFrQixDQUFDLEtBQUssSUFBSTtvQkFDbEQsQ0FBQyxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQztvQkFDM0IsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLEtBQUssSUFBSSxDQUFDLFdBQVcsSUFBSSxLQUFLLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxTQUFTO3dCQUM5RCxDQUFDLENBQUMsSUFBSTt3QkFDTixDQUFDLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsTUFBTTtnQkFDeEMsOEJBQThCLEVBQUUsS0FBSyxDQUFDLElBQUksS0FBSyxJQUFJLENBQUMscUJBQXFCO2FBQzVFLENBQUE7QUFDYixDQUFDLEVBQ0QsQ0FBQyxVQUFVLEVBQUUsV0FBVyxFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQzFCLFlBQVksRUFBRSxVQUFVO0lBQ3hCLEtBQUssRUFBRSxXQUFXLENBQUMsUUFBUTtDQUM5QixDQUFDLENBQ0wsQ0FBQSJ9
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/refiner';
|
|
2
|
-
import type * as s_function from "../../../
|
|
3
|
-
import type * as s_out from "../../../
|
|
4
|
-
import type * as s_in from "../../../
|
|
2
|
+
import type * as s_function from "../../../schemas/parse_tree_deserialization.js";
|
|
3
|
+
import type * as s_out from "../../../schemas/parse_tree.js";
|
|
4
|
+
import type * as s_in from "../../../schemas/list_of_characters.js";
|
|
5
5
|
declare namespace declarations {
|
|
6
6
|
type Document = p_.Refiner_With_Parameter<s_out.Document, s_function.Error, s_in.List_Of_Characters, s_function.Parameters>;
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as p_ from 'pareto-core/implementation/refiner';
|
|
2
|
+
import p_iterate from 'pareto-core/implementation/refiner/specials/iterate';
|
|
3
|
+
//dependencies
|
|
4
|
+
import * as r_annotated_characters from "../annotated_characters/list_of_characters.js";
|
|
5
|
+
import * as r_tokenize from "../token/annotated_character.js";
|
|
6
|
+
import * as r_from_tokenizer_result from "./tokenizer_result.js";
|
|
7
|
+
export const Document = ($, abort, $p) => {
|
|
8
|
+
const ann_chars = r_annotated_characters.Annotated_Characters($, $p);
|
|
9
|
+
return p_iterate({
|
|
10
|
+
list: ann_chars.characters,
|
|
11
|
+
end_info: ann_chars.end,
|
|
12
|
+
assign: (iterator) => r_from_tokenizer_result.Document(//fixme: make this iterate_fully
|
|
13
|
+
r_tokenize.Tokenizer_Result(iterator, ($) => abort({
|
|
14
|
+
'type': ['lexer', $],
|
|
15
|
+
}), {
|
|
16
|
+
'end info': ann_chars.end,
|
|
17
|
+
}), ($) => abort({
|
|
18
|
+
'type': ['parser', $],
|
|
19
|
+
})),
|
|
20
|
+
on_dangling_item: null, //fixme: make this iterate_fully
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdF9vZl9jaGFyYWN0ZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvZGVzZXJpYWxpemF0aW9uL2ltcGxlbWVudGF0aW9uL3JlZmluZXJzL3BhcnNlX3RyZWUvbGlzdF9vZl9jaGFyYWN0ZXJzLnRzIl0sIm5hbWVzIjpb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kFBZ0IsRUFBRSxJQUFJLEVBQUMsZ0NBQWdDO0tBQzFELENBQUMsQ0FBQTtBQUNOLENBQUMsQ0FBQSJ9
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as p_ from 'pareto-core/implementation/refiner';
|
|
2
2
|
import type * as p_ti from 'pareto-core/interface/transformer';
|
|
3
|
-
import type * as s_choice from "../../../
|
|
4
|
-
import type * as s_function from "../../../
|
|
5
|
-
import type * as s_in from "../../../
|
|
6
|
-
import type * as s_location from "../../../
|
|
7
|
-
import type * as s_out from "../../../
|
|
3
|
+
import type * as s_choice from "../../../schemas/parse_tree_deserialization.js";
|
|
4
|
+
import type * as s_function from "../../../schemas/parse_tree_deserialization.js";
|
|
5
|
+
import type * as s_in from "../../../schemas/token.js";
|
|
6
|
+
import type * as s_location from "../../../schemas/location.js";
|
|
7
|
+
import type * as s_out from "../../../schemas/parse_tree.js";
|
|
8
8
|
declare namespace declarations {
|
|
9
9
|
type Document = p_.Refiner<s_out.Document, s_function.Parser_Error, s_in.Tokenizer_Result>;
|
|
10
10
|
type Value = p_.Production<s_out.Value, s_choice.Parser_Error, s_in.Annotated_Token, s_location.Location>;
|