astn-core 0.1.0
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/globals.d.ts +26 -0
- package/dist/globals.js +2 -0
- package/dist/implementation/manual/primitives/text/serializers/apostrophed.d.ts +6 -0
- package/dist/implementation/manual/primitives/text/serializers/apostrophed.js +12 -0
- package/dist/implementation/manual/primitives/text/serializers/backticked.d.ts +6 -0
- package/dist/implementation/manual/primitives/text/serializers/backticked.js +12 -0
- package/dist/implementation/manual/primitives/text/serializers/quoted.d.ts +6 -0
- package/dist/implementation/manual/primitives/text/serializers/quoted.js +12 -0
- package/dist/implementation/manual/schemas/annotated_characters/deserializers.d.ts +14 -0
- package/dist/implementation/manual/schemas/annotated_characters/deserializers.js +185 -0
- package/dist/implementation/manual/schemas/deserialize_parse_tree/serializers.d.ts +5 -0
- package/dist/implementation/manual/schemas/deserialize_parse_tree/serializers.js +35 -0
- package/dist/implementation/manual/schemas/deserialize_parse_tree/transformers/fountain_pen.d.ts +10 -0
- package/dist/implementation/manual/schemas/deserialize_parse_tree/transformers/fountain_pen.js +116 -0
- package/dist/implementation/manual/schemas/parse_tree/deserializers.d.ts +10 -0
- package/dist/implementation/manual/schemas/parse_tree/deserializers.js +61 -0
- package/dist/implementation/manual/schemas/parse_tree/productions/new_interface_signatures.d.ts +8 -0
- package/dist/implementation/manual/schemas/parse_tree/productions/new_interface_signatures.js +3 -0
- package/dist/implementation/manual/schemas/parse_tree/productions/temp.d.ts +3 -0
- package/dist/implementation/manual/schemas/parse_tree/productions/temp.js +55 -0
- package/dist/implementation/manual/schemas/parse_tree/productions/token.d.ts +27 -0
- package/dist/implementation/manual/schemas/parse_tree/productions/token.js +184 -0
- package/dist/implementation/manual/schemas/sealed_target/serializers.d.ts +4 -0
- package/dist/implementation/manual/schemas/sealed_target/serializers.js +35 -0
- package/dist/implementation/manual/schemas/sealed_target/transformers/fountain_pen_block.d.ts +4 -0
- package/dist/implementation/manual/schemas/sealed_target/transformers/fountain_pen_block.js +125 -0
- package/dist/implementation/manual/schemas/token/productions/annotated_character.d.ts +19 -0
- package/dist/implementation/manual/schemas/token/productions/annotated_character.js +571 -0
- package/dist/implementation/manual/schemas/token/transformers/fountain_pen.d.ts +13 -0
- package/dist/implementation/manual/schemas/token/transformers/fountain_pen.js +53 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/interface/generated/pareto/core/location.d.ts +11 -0
- package/dist/interface/generated/pareto/core/location.js +3 -0
- package/dist/interface/generated/pareto/schemas/deserialize_parse_tree/data.d.ts +118 -0
- package/dist/interface/generated/pareto/schemas/deserialize_parse_tree/data.js +3 -0
- package/dist/interface/generated/pareto/schemas/deserialize_parse_tree/migrate_boilerplate.d.ts +31 -0
- package/dist/interface/generated/pareto/schemas/deserialize_parse_tree/migrate_boilerplate.js +3 -0
- package/dist/interface/generated/pareto/schemas/parse_tree/data.d.ts +182 -0
- package/dist/interface/generated/pareto/schemas/parse_tree/data.js +3 -0
- package/dist/interface/generated/pareto/schemas/parse_tree/migrate_boilerplate.d.ts +52 -0
- package/dist/interface/generated/pareto/schemas/parse_tree/migrate_boilerplate.js +3 -0
- package/dist/interface/generated/pareto/schemas/sealed_target/data.d.ts +48 -0
- package/dist/interface/generated/pareto/schemas/sealed_target/data.js +3 -0
- package/dist/interface/generated/pareto/schemas/sealed_target/migrate_boilerplate.d.ts +17 -0
- package/dist/interface/generated/pareto/schemas/sealed_target/migrate_boilerplate.js +3 -0
- package/dist/interface/generated/pareto/schemas/token/data.d.ts +121 -0
- package/dist/interface/generated/pareto/schemas/token/data.js +3 -0
- package/dist/interface/generated/pareto/schemas/token/migrate_boilerplate.d.ts +73 -0
- package/dist/interface/generated/pareto/schemas/token/migrate_boilerplate.js +3 -0
- package/dist/interface/to_be_generated/annotated_characters.d.ts +14 -0
- package/dist/interface/to_be_generated/annotated_characters.js +3 -0
- package/package.json +39 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import * as _pi from "pareto-core-interface";
|
|
2
|
+
export declare namespace Relative_Location_ {
|
|
3
|
+
type uri = string;
|
|
4
|
+
type line = number;
|
|
5
|
+
type column = number;
|
|
6
|
+
}
|
|
7
|
+
export type Relative_Location_ = {
|
|
8
|
+
readonly 'uri': Relative_Location_.uri;
|
|
9
|
+
readonly 'line': Relative_Location_.line;
|
|
10
|
+
readonly 'column': Relative_Location_.column;
|
|
11
|
+
};
|
|
12
|
+
export declare namespace Location_ {
|
|
13
|
+
type relative = Relative_Location_;
|
|
14
|
+
type absolute = number;
|
|
15
|
+
}
|
|
16
|
+
export type Location_ = {
|
|
17
|
+
readonly 'relative': Location_.relative;
|
|
18
|
+
readonly 'absolute': Location_.absolute;
|
|
19
|
+
};
|
|
20
|
+
export declare namespace Range_ {
|
|
21
|
+
type start = Location_;
|
|
22
|
+
type end = Location_;
|
|
23
|
+
}
|
|
24
|
+
export type Range_ = {
|
|
25
|
+
readonly 'start': Range_.start;
|
|
26
|
+
readonly 'end': Range_.end;
|
|
27
|
+
};
|
|
28
|
+
export declare namespace Whitespace_ {
|
|
29
|
+
type range = Range_;
|
|
30
|
+
type value = string;
|
|
31
|
+
}
|
|
32
|
+
export type Whitespace_ = {
|
|
33
|
+
readonly 'range': Whitespace_.range;
|
|
34
|
+
readonly 'value': Whitespace_.value;
|
|
35
|
+
};
|
|
36
|
+
export declare namespace Trivia_ {
|
|
37
|
+
type leading_whitespace = Whitespace_;
|
|
38
|
+
namespace comments {
|
|
39
|
+
namespace L {
|
|
40
|
+
namespace _type {
|
|
41
|
+
type line = null;
|
|
42
|
+
type block = null;
|
|
43
|
+
}
|
|
44
|
+
type _type = readonly ['line', _type.line] | readonly ['block', _type.block];
|
|
45
|
+
type content = string;
|
|
46
|
+
type range = Range_;
|
|
47
|
+
type trailing_whitespace = Whitespace_;
|
|
48
|
+
}
|
|
49
|
+
type L = {
|
|
50
|
+
readonly 'type': L._type;
|
|
51
|
+
readonly 'content': L.content;
|
|
52
|
+
readonly 'range': L.range;
|
|
53
|
+
readonly 'trailing whitespace': L.trailing_whitespace;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
type comments = _pi.List<comments.L>;
|
|
57
|
+
}
|
|
58
|
+
export type Trivia_ = {
|
|
59
|
+
readonly 'leading whitespace': Trivia_.leading_whitespace;
|
|
60
|
+
readonly 'comments': Trivia_.comments;
|
|
61
|
+
};
|
|
62
|
+
export type Delimited_Text_ = string;
|
|
63
|
+
export declare namespace Text_Type_ {
|
|
64
|
+
type quoted = null;
|
|
65
|
+
type apostrophed = null;
|
|
66
|
+
type undelimited = null;
|
|
67
|
+
type backticked = null;
|
|
68
|
+
}
|
|
69
|
+
export type Text_Type_ = readonly ['quoted', Text_Type_.quoted] | readonly ['apostrophed', Text_Type_.apostrophed] | readonly ['undelimited', Text_Type_.undelimited] | readonly ['backticked', Text_Type_.backticked];
|
|
70
|
+
export declare namespace Token_Type_ {
|
|
71
|
+
type $ex_ = null;
|
|
72
|
+
type $at_ = null;
|
|
73
|
+
type $cl_ = null;
|
|
74
|
+
type $ha_ = null;
|
|
75
|
+
type $co_ = null;
|
|
76
|
+
type $cc_ = null;
|
|
77
|
+
type $bo_ = null;
|
|
78
|
+
type $bc_ = null;
|
|
79
|
+
type $po_ = null;
|
|
80
|
+
type $pc_ = null;
|
|
81
|
+
type $st_ = null;
|
|
82
|
+
type $gt_ = null;
|
|
83
|
+
type $ti_ = null;
|
|
84
|
+
type $sr_ = null;
|
|
85
|
+
type $vb_ = null;
|
|
86
|
+
namespace text {
|
|
87
|
+
type value = Delimited_Text_;
|
|
88
|
+
type _type = Text_Type_;
|
|
89
|
+
}
|
|
90
|
+
type text = {
|
|
91
|
+
readonly 'value': text.value;
|
|
92
|
+
readonly 'type': text._type;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export type Token_Type_ = readonly ['!', Token_Type_.$ex_] | readonly ['@', Token_Type_.$at_] | readonly [':', Token_Type_.$cl_] | readonly ['#', Token_Type_.$ha_] | readonly ['{', Token_Type_.$co_] | readonly ['}', Token_Type_.$cc_] | readonly ['[', Token_Type_.$bo_] | readonly [']', Token_Type_.$bc_] | readonly ['(', Token_Type_.$po_] | readonly [')', Token_Type_.$pc_] | readonly ['<', Token_Type_.$st_] | readonly ['>', Token_Type_.$gt_] | readonly ['~', Token_Type_.$ti_] | readonly ['*', Token_Type_.$sr_] | readonly ['|', Token_Type_.$vb_] | readonly ['text', Token_Type_.text];
|
|
96
|
+
export declare namespace Annotated_Token_ {
|
|
97
|
+
type start = Location_;
|
|
98
|
+
type _type = Token_Type_;
|
|
99
|
+
type end = Location_;
|
|
100
|
+
type trailing_trivia = Trivia_;
|
|
101
|
+
}
|
|
102
|
+
export type Annotated_Token_ = {
|
|
103
|
+
readonly 'start': Annotated_Token_.start;
|
|
104
|
+
readonly 'type': Annotated_Token_._type;
|
|
105
|
+
readonly 'end': Annotated_Token_.end;
|
|
106
|
+
readonly 'trailing trivia': Annotated_Token_.trailing_trivia;
|
|
107
|
+
};
|
|
108
|
+
export declare namespace Tokenizer_Result_ {
|
|
109
|
+
type leading_trivia = Trivia_;
|
|
110
|
+
namespace tokens {
|
|
111
|
+
type L = Annotated_Token_;
|
|
112
|
+
}
|
|
113
|
+
type tokens = _pi.List<tokens.L>;
|
|
114
|
+
type end = Location_;
|
|
115
|
+
}
|
|
116
|
+
export type Tokenizer_Result_ = {
|
|
117
|
+
readonly 'leading trivia': Tokenizer_Result_.leading_trivia;
|
|
118
|
+
readonly 'tokens': Tokenizer_Result_.tokens;
|
|
119
|
+
readonly 'end': Tokenizer_Result_.end;
|
|
120
|
+
};
|
|
121
|
+
export { Relative_Location_ as Relative_Location, Location_ as Location, Range_ as Range, Whitespace_ as Whitespace, Trivia_ as Trivia, Delimited_Text_ as Delimited_Text, Text_Type_ as Text_Type, Token_Type_ as Token_Type, Annotated_Token_ as Annotated_Token, Tokenizer_Result_ as Tokenizer_Result, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcmZhY2UvZ2VuZXJhdGVkL3BhcmV0by9zY2hlbWFzL3Rva2VuL2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as i_out from "./data";
|
|
2
|
+
import * as i_in from "./data";
|
|
3
|
+
export declare namespace Relative_Location_ {
|
|
4
|
+
type I = i_in.Relative_Location;
|
|
5
|
+
type O = i_out.Relative_Location;
|
|
6
|
+
namespace P {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export type Relative_Location_ = ($$_: Relative_Location_.I) => Relative_Location_.O;
|
|
10
|
+
export declare namespace Location_ {
|
|
11
|
+
type I = i_in.Location;
|
|
12
|
+
type O = i_out.Location;
|
|
13
|
+
namespace P {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export type Location_ = ($$_: Location_.I) => Location_.O;
|
|
17
|
+
export declare namespace Range_ {
|
|
18
|
+
type I = i_in.Range;
|
|
19
|
+
type O = i_out.Range;
|
|
20
|
+
namespace P {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export type Range_ = ($$_: Range_.I) => Range_.O;
|
|
24
|
+
export declare namespace Whitespace_ {
|
|
25
|
+
type I = i_in.Whitespace;
|
|
26
|
+
type O = i_out.Whitespace;
|
|
27
|
+
namespace P {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export type Whitespace_ = ($$_: Whitespace_.I) => Whitespace_.O;
|
|
31
|
+
export declare namespace Trivia_ {
|
|
32
|
+
type I = i_in.Trivia;
|
|
33
|
+
type O = i_out.Trivia;
|
|
34
|
+
namespace P {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export type Trivia_ = ($$_: Trivia_.I) => Trivia_.O;
|
|
38
|
+
export declare namespace Delimited_Text_ {
|
|
39
|
+
type I = i_in.Delimited_Text;
|
|
40
|
+
type O = i_out.Delimited_Text;
|
|
41
|
+
namespace P {
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export type Delimited_Text_ = ($$_: Delimited_Text_.I) => Delimited_Text_.O;
|
|
45
|
+
export declare namespace Text_Type_ {
|
|
46
|
+
type I = i_in.Text_Type;
|
|
47
|
+
type O = i_out.Text_Type;
|
|
48
|
+
namespace P {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export type Text_Type_ = ($$_: Text_Type_.I) => Text_Type_.O;
|
|
52
|
+
export declare namespace Token_Type_ {
|
|
53
|
+
type I = i_in.Token_Type;
|
|
54
|
+
type O = i_out.Token_Type;
|
|
55
|
+
namespace P {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export type Token_Type_ = ($$_: Token_Type_.I) => Token_Type_.O;
|
|
59
|
+
export declare namespace Annotated_Token_ {
|
|
60
|
+
type I = i_in.Annotated_Token;
|
|
61
|
+
type O = i_out.Annotated_Token;
|
|
62
|
+
namespace P {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export type Annotated_Token_ = ($$_: Annotated_Token_.I) => Annotated_Token_.O;
|
|
66
|
+
export declare namespace Tokenizer_Result_ {
|
|
67
|
+
type I = i_in.Tokenizer_Result;
|
|
68
|
+
type O = i_out.Tokenizer_Result;
|
|
69
|
+
namespace P {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export type Tokenizer_Result_ = ($$_: Tokenizer_Result_.I) => Tokenizer_Result_.O;
|
|
73
|
+
export { Relative_Location_ as Relative_Location, Location_ as Location, Range_ as Range, Whitespace_ as Whitespace, Trivia_ as Trivia, Delimited_Text_ as Delimited_Text, Text_Type_ as Text_Type, Token_Type_ as Token_Type, Annotated_Token_ as Annotated_Token, Tokenizer_Result_ as Tokenizer_Result, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0ZV9ib2lsZXJwbGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcmZhY2UvZ2VuZXJhdGVkL3BhcmV0by9zY2hlbWFzL3Rva2VuL21pZ3JhdGVfYm9pbGVycGxhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _pi from 'pareto-core-interface';
|
|
2
|
+
export type Annotated_Character = {
|
|
3
|
+
'code': number;
|
|
4
|
+
'location': {
|
|
5
|
+
absolute: number;
|
|
6
|
+
relative: {
|
|
7
|
+
'uri': string;
|
|
8
|
+
'line': number;
|
|
9
|
+
'column': number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
'line indentation': number;
|
|
13
|
+
};
|
|
14
|
+
export type Annotated_Characters = _pi.List<Annotated_Character>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ub3RhdGVkX2NoYXJhY3RlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW50ZXJmYWNlL3RvX2JlX2dlbmVyYXRlZC9hbm5vdGF0ZWRfY2hhcmFjdGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "astn-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The TypeScript library for parsing and formatting ASTN (Abstract Syntax Tree Notation) - a human-editable data format for structured content",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"documentation"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [
|
|
14
|
+
"astn",
|
|
15
|
+
"parser",
|
|
16
|
+
"formatter",
|
|
17
|
+
"abstract-syntax-tree",
|
|
18
|
+
"data-format",
|
|
19
|
+
"typescript",
|
|
20
|
+
"lexer",
|
|
21
|
+
"structured-data",
|
|
22
|
+
"configuration",
|
|
23
|
+
"serialization"
|
|
24
|
+
],
|
|
25
|
+
"author": "Corno",
|
|
26
|
+
"license": "Apache-2.0",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/corno/astn-core.git"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/corno/astn-core/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/corno/astn-core#readme",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"pareto-core-refiner": "^0.1.17",
|
|
37
|
+
"pareto-fountain-pen": "^0.3.32"
|
|
38
|
+
}
|
|
39
|
+
}
|