@nfdi4plants/arctrl 3.0.0 → 3.0.1
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/ts/ts/CWL/Decode.d.ts +15 -11
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Decode.js +73 -23
- package/dist/ts/ts/CWL/Encode.d.ts +8 -1
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Encode.js +15 -11
- package/dist/ts/ts/CWL/Requirements.d.ts +1 -1
- package/dist/ts/ts/CWL/Requirements.js +1 -1
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +1 -1
- package/dist/ts/ts/CWL/WorkflowSteps.js +1 -1
- package/dist/ts/ts/Conversion/Workflow.js +3 -3
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +6 -6
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +6 -6
- package/dist/ts/ts/Yaml.js +1 -1
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.4}/Encode.fs.js +9 -9
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Escapes.fs.js +313 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.4}/FlowToBlock.fs.js +14 -12
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Persil.fs.js +562 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.4}/Preprocessing.fs.js +52 -12
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Reader.fs.js +1314 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.4}/Regex.fs.js +7 -1
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/RegexActivePatterns.fs.js +313 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/StringBuffer.fs.js +60 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Writer.fs.js +391 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/YAMLiciousTypes.fs.js +317 -0
- package/package.json +1 -1
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/Persil.fs.js +0 -45
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/Reader.fs.js +0 -539
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/RegexActivePatterns.fs.js +0 -216
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/Writer.fs.js +0 -164
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/YAMLiciousTypes.fs.js +0 -152
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.4}/Decode.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.4}/Interop/JsInterop.fs.js +0 -0
|
@@ -1,539 +0,0 @@
|
|
|
1
|
-
import { match, replace } from '../../../node_modules/@fable-org/fable-library-js/RegExp.js';
|
|
2
|
-
import { getItemFromDict } from '../../../node_modules/@fable-org/fable-library-js/MapUtil.js';
|
|
3
|
-
import { parse } from '../../../node_modules/@fable-org/fable-library-js/Int32.js';
|
|
4
|
-
import { map, value, unwrap } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
-
import { toList, delay, append, singleton, takeWhile, skipWhile, map as map$1, collect as collect$1 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
6
|
-
import { PreprocessorElement_Line, YAMLElement_Object, YAMLElement_Mapping, YAMLContent_create_27AED5E3, YAMLElement_Comment, YAMLElement_Value, YAMLElement_Sequence } from './YAMLiciousTypes.fs.js';
|
|
7
|
-
import { isEmpty, head, tail, empty, singleton as singleton$1, cons, collect, reverse, append as append$1, ofArrayWithTail } from '../../../node_modules/@fable-org/fable-library-js/List.js';
|
|
8
|
-
import { $007CSequenceMinusOpener$007C_$007C, $007CYamlComment$007C_$007C, $007CSchemaNamespace$007C_$007C, $007CInlineSequence$007C_$007C, $007CSequenceSquareOpener$007C_$007C, $007CSequenceSquareCloser$007C_$007C, $007CInlineJSON$007C_$007C, $007CJSONKeyOpener$007C_$007C, $007CJSONCloser$007C_$007C, $007CKey$007C_$007C, $007CKeyValue$007C_$007C, $007CYamlValue$007C_$007C } from './RegexActivePatterns.fs.js';
|
|
9
|
-
import { toFail, printf, join, trimEnd, split } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
10
|
-
import { transformElements, defaultContext } from './FlowToBlock.fs.js';
|
|
11
|
-
import { read as read$1 } from './Preprocessing.fs.js';
|
|
12
|
-
|
|
13
|
-
function restoreStringReplace(stringDict, v) {
|
|
14
|
-
const m = match(/<s f=(?<index>\d+)\/>/gu, v);
|
|
15
|
-
if (m != null) {
|
|
16
|
-
return getItemFromDict(stringDict, parse(m.groups && m.groups.index || "", 511, false, 32));
|
|
17
|
-
} else {
|
|
18
|
-
return v;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function restoreCommentReplace(commentDict, commentId) {
|
|
22
|
-
return map((id) => getItemFromDict(commentDict, id), commentId);
|
|
23
|
-
}
|
|
24
|
-
function collectSequenceElements(eles) {
|
|
25
|
-
let matchResult, rest, v, yamlAstList;
|
|
26
|
-
if (!isEmpty(eles)) {
|
|
27
|
-
const activePatternResult = $007CSequenceMinusOpener$007C_$007C(head(eles));
|
|
28
|
-
if (activePatternResult != null) {
|
|
29
|
-
if (!isEmpty(tail(eles))) {
|
|
30
|
-
if (head(tail(eles)).tag === /* Intendation */
|
|
31
|
-
1) {
|
|
32
|
-
matchResult = 0;
|
|
33
|
-
rest = tail(tail(eles));
|
|
34
|
-
v = value(activePatternResult);
|
|
35
|
-
yamlAstList = head(tail(eles)).fields[0];
|
|
36
|
-
} else {
|
|
37
|
-
matchResult = 1;
|
|
38
|
-
}
|
|
39
|
-
} else {
|
|
40
|
-
matchResult = 1;
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
matchResult = 1;
|
|
44
|
-
}
|
|
45
|
-
} else {
|
|
46
|
-
matchResult = 1;
|
|
47
|
-
}
|
|
48
|
-
switch (matchResult) {
|
|
49
|
-
case 0:
|
|
50
|
-
return toList(delay(() => append(v.Value != null ? singleton(cons(PreprocessorElement_Line(value(v.Value)), yamlAstList)) : singleton(yamlAstList), delay(() => collectSequenceElements(rest)))));
|
|
51
|
-
default:
|
|
52
|
-
if (isEmpty(eles)) {
|
|
53
|
-
return empty();
|
|
54
|
-
} else {
|
|
55
|
-
const activePatternResult_1 = $007CSequenceMinusOpener$007C_$007C(head(eles));
|
|
56
|
-
if (activePatternResult_1 != null) {
|
|
57
|
-
const v_1 = value(activePatternResult_1);
|
|
58
|
-
return toList(delay(() => append(singleton(singleton$1(PreprocessorElement_Line(value(v_1.Value)))), delay(() => collectSequenceElements(tail(eles))))));
|
|
59
|
-
} else if ($007CYamlComment$007C_$007C(head(eles)) != null) {
|
|
60
|
-
return toList(delay(() => append(singleton(singleton$1(head(eles))), delay(() => collectSequenceElements(tail(eles))))));
|
|
61
|
-
} else {
|
|
62
|
-
return toFail(printf("Unknown pattern for sequence elements: %A"))(eles);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function isSequenceElement(e) {
|
|
68
|
-
let matchResult;
|
|
69
|
-
if (e.tag === /* Intendation */
|
|
70
|
-
1) {
|
|
71
|
-
matchResult = 0;
|
|
72
|
-
} else if ($007CSequenceMinusOpener$007C_$007C(e) != null) {
|
|
73
|
-
matchResult = 0;
|
|
74
|
-
} else if ($007CYamlComment$007C_$007C(e) != null) {
|
|
75
|
-
matchResult = 0;
|
|
76
|
-
} else {
|
|
77
|
-
matchResult = 1;
|
|
78
|
-
}
|
|
79
|
-
switch (matchResult) {
|
|
80
|
-
case 0:
|
|
81
|
-
return true;
|
|
82
|
-
default:
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function tokenize(yamlList, stringDict, commentDict) {
|
|
87
|
-
const flattenBlockScalar = (eles) => collect((_arg) => {
|
|
88
|
-
switch (_arg.tag) {
|
|
89
|
-
case /* Line */
|
|
90
|
-
2:
|
|
91
|
-
return singleton$1(replace(replace(_arg.fields[0], "<s f=(?<index>\\d+)\\/>", (m) => getItemFromDict(stringDict, parse(m.groups && m.groups.index || "", 511, false, 32))), "<c f=(?<comment>\\d+)\\/>", (m_1) => "#" + getItemFromDict(commentDict, parse(m_1.groups && m_1.groups.comment || "", 511, false, 32))));
|
|
92
|
-
case /* Intendation */
|
|
93
|
-
1:
|
|
94
|
-
return flattenBlockScalar(_arg.fields[0]);
|
|
95
|
-
default:
|
|
96
|
-
return empty();
|
|
97
|
-
}
|
|
98
|
-
}, eles);
|
|
99
|
-
const loopRead = (restlist_mut, acc_mut) => {
|
|
100
|
-
let c2_2, c1_2, c1_1, c2_1, v_12, block, v_7, v_5;
|
|
101
|
-
loopRead:
|
|
102
|
-
while (true) {
|
|
103
|
-
const restlist = restlist_mut, acc = acc_mut;
|
|
104
|
-
let matchResult, rest0, v, yamlAstList;
|
|
105
|
-
if (!isEmpty(restlist)) {
|
|
106
|
-
const activePatternResult = $007CSchemaNamespace$007C_$007C(head(restlist));
|
|
107
|
-
if (activePatternResult != null) {
|
|
108
|
-
if (!isEmpty(tail(restlist))) {
|
|
109
|
-
if (head(tail(restlist)).tag === /* Intendation */
|
|
110
|
-
1) {
|
|
111
|
-
matchResult = 0;
|
|
112
|
-
rest0 = tail(tail(restlist));
|
|
113
|
-
v = value(activePatternResult);
|
|
114
|
-
yamlAstList = head(tail(restlist)).fields[0];
|
|
115
|
-
} else {
|
|
116
|
-
matchResult = 1;
|
|
117
|
-
}
|
|
118
|
-
} else {
|
|
119
|
-
matchResult = 1;
|
|
120
|
-
}
|
|
121
|
-
} else {
|
|
122
|
-
matchResult = 1;
|
|
123
|
-
}
|
|
124
|
-
} else {
|
|
125
|
-
matchResult = 1;
|
|
126
|
-
}
|
|
127
|
-
switch (matchResult) {
|
|
128
|
-
case 0: {
|
|
129
|
-
const sequenceElements = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0)));
|
|
130
|
-
restlist_mut = toList(skipWhile(isSequenceElement, rest0));
|
|
131
|
-
acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(cons(PreprocessorElement_Line(v.Key), yamlAstList), empty())), delay(() => map$1((i) => loopRead(i, empty()), sequenceElements)))))), acc);
|
|
132
|
-
continue loopRead;
|
|
133
|
-
}
|
|
134
|
-
default: {
|
|
135
|
-
let matchResult_1, rest0_1, v_1, rest0_2, v_2, yamlAstList_1;
|
|
136
|
-
if (!isEmpty(restlist)) {
|
|
137
|
-
const activePatternResult_1 = $007CSchemaNamespace$007C_$007C(head(restlist));
|
|
138
|
-
if (activePatternResult_1 != null) {
|
|
139
|
-
matchResult_1 = 0;
|
|
140
|
-
rest0_1 = tail(restlist);
|
|
141
|
-
v_1 = value(activePatternResult_1);
|
|
142
|
-
} else {
|
|
143
|
-
const activePatternResult_2 = $007CSequenceMinusOpener$007C_$007C(head(restlist));
|
|
144
|
-
if (activePatternResult_2 != null) {
|
|
145
|
-
if (!isEmpty(tail(restlist))) {
|
|
146
|
-
if (head(tail(restlist)).tag === /* Intendation */
|
|
147
|
-
1) {
|
|
148
|
-
matchResult_1 = 1;
|
|
149
|
-
rest0_2 = tail(tail(restlist));
|
|
150
|
-
v_2 = value(activePatternResult_2);
|
|
151
|
-
yamlAstList_1 = head(tail(restlist)).fields[0];
|
|
152
|
-
} else {
|
|
153
|
-
matchResult_1 = 2;
|
|
154
|
-
}
|
|
155
|
-
} else {
|
|
156
|
-
matchResult_1 = 2;
|
|
157
|
-
}
|
|
158
|
-
} else {
|
|
159
|
-
matchResult_1 = 2;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
} else {
|
|
163
|
-
matchResult_1 = 2;
|
|
164
|
-
}
|
|
165
|
-
switch (matchResult_1) {
|
|
166
|
-
case 0: {
|
|
167
|
-
const sequenceElements_1 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_1)));
|
|
168
|
-
restlist_mut = toList(skipWhile(isSequenceElement, rest0_1));
|
|
169
|
-
acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(singleton$1(PreprocessorElement_Line(v_1.Key)), empty())), delay(() => map$1((i_1) => loopRead(i_1, empty()), sequenceElements_1)))))), acc);
|
|
170
|
-
continue loopRead;
|
|
171
|
-
}
|
|
172
|
-
case 1: {
|
|
173
|
-
const objectList_1 = v_2.Value != null ? cons(PreprocessorElement_Line(value(v_2.Value)), yamlAstList_1) : yamlAstList_1;
|
|
174
|
-
const sequenceElements_2 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_2)));
|
|
175
|
-
restlist_mut = toList(skipWhile(isSequenceElement, rest0_2));
|
|
176
|
-
acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(objectList_1, empty())), delay(() => map$1((i_2) => loopRead(i_2, empty()), sequenceElements_2)))))), acc);
|
|
177
|
-
continue loopRead;
|
|
178
|
-
}
|
|
179
|
-
default: {
|
|
180
|
-
let matchResult_2, rest0_3, v_3, rest_4, v_4, closer, iList, opener, rest_5;
|
|
181
|
-
if (!isEmpty(restlist)) {
|
|
182
|
-
const activePatternResult_3 = $007CSequenceMinusOpener$007C_$007C(head(restlist));
|
|
183
|
-
if (activePatternResult_3 != null) {
|
|
184
|
-
matchResult_2 = 0;
|
|
185
|
-
rest0_3 = tail(restlist);
|
|
186
|
-
v_3 = value(activePatternResult_3);
|
|
187
|
-
} else {
|
|
188
|
-
const activePatternResult_4 = $007CInlineSequence$007C_$007C(head(restlist));
|
|
189
|
-
if (activePatternResult_4 != null) {
|
|
190
|
-
matchResult_2 = 1;
|
|
191
|
-
rest_4 = tail(restlist);
|
|
192
|
-
v_4 = value(activePatternResult_4);
|
|
193
|
-
} else {
|
|
194
|
-
const activePatternResult_5 = $007CSequenceSquareOpener$007C_$007C(head(restlist));
|
|
195
|
-
if (activePatternResult_5 != null) {
|
|
196
|
-
if (!isEmpty(tail(restlist))) {
|
|
197
|
-
if (head(tail(restlist)).tag === /* Intendation */
|
|
198
|
-
1) {
|
|
199
|
-
if (!isEmpty(tail(tail(restlist)))) {
|
|
200
|
-
const activePatternResult_6 = $007CSequenceSquareCloser$007C_$007C(head(tail(tail(restlist))));
|
|
201
|
-
if (activePatternResult_6 != null) {
|
|
202
|
-
matchResult_2 = 2;
|
|
203
|
-
closer = value(activePatternResult_6);
|
|
204
|
-
iList = head(tail(restlist)).fields[0];
|
|
205
|
-
opener = value(activePatternResult_5);
|
|
206
|
-
rest_5 = tail(tail(tail(restlist)));
|
|
207
|
-
} else {
|
|
208
|
-
matchResult_2 = 3;
|
|
209
|
-
}
|
|
210
|
-
} else {
|
|
211
|
-
matchResult_2 = 3;
|
|
212
|
-
}
|
|
213
|
-
} else {
|
|
214
|
-
matchResult_2 = 3;
|
|
215
|
-
}
|
|
216
|
-
} else {
|
|
217
|
-
matchResult_2 = 3;
|
|
218
|
-
}
|
|
219
|
-
} else {
|
|
220
|
-
matchResult_2 = 3;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
} else {
|
|
225
|
-
matchResult_2 = 3;
|
|
226
|
-
}
|
|
227
|
-
switch (matchResult_2) {
|
|
228
|
-
case 0: {
|
|
229
|
-
const sequenceElements_3 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_3)));
|
|
230
|
-
restlist_mut = toList(skipWhile(isSequenceElement, rest0_3));
|
|
231
|
-
acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(singleton$1(PreprocessorElement_Line(value(v_3.Value))), empty())), delay(() => map$1((i_3) => loopRead(i_3, empty()), sequenceElements_3)))))), acc);
|
|
232
|
-
continue loopRead;
|
|
233
|
-
}
|
|
234
|
-
case 1: {
|
|
235
|
-
const c = restoreCommentReplace(commentDict, v_4.Comment);
|
|
236
|
-
const split$1 = split(v_4.Value, [","], void 0, 1);
|
|
237
|
-
const current_4 = YAMLElement_Sequence(toList(delay(() => map$1((value_2) => loopRead(singleton$1(PreprocessorElement_Line(value_2.trim())), empty()), split$1))));
|
|
238
|
-
restlist_mut = rest_4;
|
|
239
|
-
acc_mut = c != null ? ofArrayWithTail([current_4, YAMLElement_Comment(value(c))], acc) : cons(current_4, acc);
|
|
240
|
-
continue loopRead;
|
|
241
|
-
}
|
|
242
|
-
case 2: {
|
|
243
|
-
const c1 = restoreCommentReplace(commentDict, opener.Comment);
|
|
244
|
-
const c2 = restoreCommentReplace(commentDict, closer.Comment);
|
|
245
|
-
const current_5 = YAMLElement_Sequence(toList(delay(() => collect$1((i_4) => singleton(loopRead(singleton$1(i_4.tag === /* Line */
|
|
246
|
-
2 ? PreprocessorElement_Line(trimEnd(i_4.fields[0], ",")) : toFail(printf("Unexpected element in MultiLineSquareBrackets: %A"))(i_4)), empty())), iList))));
|
|
247
|
-
restlist_mut = rest_5;
|
|
248
|
-
acc_mut = c1 == null ? c2 == null ? cons(current_5, acc) : (c2_2 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_2), current_5], acc)) : c2 == null ? (c1_2 = value(c1), ofArrayWithTail([current_5, YAMLElement_Comment(c1_2)], acc)) : (c1_1 = value(c1), c2_1 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_1), current_5, YAMLElement_Comment(c1_1)], acc));
|
|
249
|
-
continue loopRead;
|
|
250
|
-
}
|
|
251
|
-
default: {
|
|
252
|
-
let matchResult_3, rest_7, v_6;
|
|
253
|
-
if (!isEmpty(restlist)) {
|
|
254
|
-
const activePatternResult_7 = $007CInlineJSON$007C_$007C(head(restlist));
|
|
255
|
-
if (activePatternResult_7 != null) {
|
|
256
|
-
if (v_5 = value(activePatternResult_7), v_5.Value.trim() === "") {
|
|
257
|
-
matchResult_3 = 0;
|
|
258
|
-
rest_7 = tail(restlist);
|
|
259
|
-
v_6 = value(activePatternResult_7);
|
|
260
|
-
} else {
|
|
261
|
-
matchResult_3 = 1;
|
|
262
|
-
}
|
|
263
|
-
} else {
|
|
264
|
-
matchResult_3 = 1;
|
|
265
|
-
}
|
|
266
|
-
} else {
|
|
267
|
-
matchResult_3 = 1;
|
|
268
|
-
}
|
|
269
|
-
switch (matchResult_3) {
|
|
270
|
-
case 0: {
|
|
271
|
-
const c_1 = restoreCommentReplace(commentDict, v_6.Comment);
|
|
272
|
-
const current_6 = empty();
|
|
273
|
-
restlist_mut = rest_7;
|
|
274
|
-
acc_mut = c_1 != null ? append$1(current_6, cons(YAMLElement_Comment(value(c_1)), acc)) : append$1(current_6, acc);
|
|
275
|
-
continue loopRead;
|
|
276
|
-
}
|
|
277
|
-
default: {
|
|
278
|
-
let matchResult_4, opener_1;
|
|
279
|
-
if (!isEmpty(restlist)) {
|
|
280
|
-
const activePatternResult_8 = $007CJSONKeyOpener$007C_$007C(head(restlist));
|
|
281
|
-
if (activePatternResult_8 != null) {
|
|
282
|
-
if (!isEmpty(tail(restlist))) {
|
|
283
|
-
if (head(tail(restlist)).tag === /* Intendation */
|
|
284
|
-
1) {
|
|
285
|
-
if (!isEmpty(tail(tail(restlist)))) {
|
|
286
|
-
if ($007CJSONCloser$007C_$007C(head(tail(tail(restlist)))) != null) {
|
|
287
|
-
matchResult_4 = 0;
|
|
288
|
-
opener_1 = value(activePatternResult_8);
|
|
289
|
-
} else {
|
|
290
|
-
matchResult_4 = 1;
|
|
291
|
-
}
|
|
292
|
-
} else {
|
|
293
|
-
matchResult_4 = 1;
|
|
294
|
-
}
|
|
295
|
-
} else {
|
|
296
|
-
matchResult_4 = 1;
|
|
297
|
-
}
|
|
298
|
-
} else {
|
|
299
|
-
matchResult_4 = 1;
|
|
300
|
-
}
|
|
301
|
-
} else {
|
|
302
|
-
matchResult_4 = 1;
|
|
303
|
-
}
|
|
304
|
-
} else {
|
|
305
|
-
matchResult_4 = 1;
|
|
306
|
-
}
|
|
307
|
-
switch (matchResult_4) {
|
|
308
|
-
case 0:
|
|
309
|
-
return toFail(printf("Untransformed flow-style object detected. This is a bug in FlowToBlock transformation. Pattern: %A"))(opener_1);
|
|
310
|
-
default: {
|
|
311
|
-
let matchResult_5, v_8;
|
|
312
|
-
if (!isEmpty(restlist)) {
|
|
313
|
-
const activePatternResult_10 = $007CInlineJSON$007C_$007C(head(restlist));
|
|
314
|
-
if (activePatternResult_10 != null) {
|
|
315
|
-
if (v_7 = value(activePatternResult_10), v_7.Value.trim() !== "") {
|
|
316
|
-
matchResult_5 = 0;
|
|
317
|
-
v_8 = value(activePatternResult_10);
|
|
318
|
-
} else {
|
|
319
|
-
matchResult_5 = 1;
|
|
320
|
-
}
|
|
321
|
-
} else {
|
|
322
|
-
matchResult_5 = 1;
|
|
323
|
-
}
|
|
324
|
-
} else {
|
|
325
|
-
matchResult_5 = 1;
|
|
326
|
-
}
|
|
327
|
-
switch (matchResult_5) {
|
|
328
|
-
case 0:
|
|
329
|
-
return toFail(printf("Untransformed non-empty flow-style object detected: {%s}. This is a bug in FlowToBlock transformation."))(v_8.Value);
|
|
330
|
-
default: {
|
|
331
|
-
let matchResult_6, rest_8, v_9, yamlAstList_2;
|
|
332
|
-
if (!isEmpty(restlist)) {
|
|
333
|
-
const activePatternResult_11 = $007CKey$007C_$007C(head(restlist));
|
|
334
|
-
if (activePatternResult_11 != null) {
|
|
335
|
-
if (!isEmpty(tail(restlist))) {
|
|
336
|
-
if (head(tail(restlist)).tag === /* Intendation */
|
|
337
|
-
1) {
|
|
338
|
-
matchResult_6 = 0;
|
|
339
|
-
rest_8 = tail(tail(restlist));
|
|
340
|
-
v_9 = value(activePatternResult_11);
|
|
341
|
-
yamlAstList_2 = head(tail(restlist)).fields[0];
|
|
342
|
-
} else {
|
|
343
|
-
matchResult_6 = 1;
|
|
344
|
-
}
|
|
345
|
-
} else {
|
|
346
|
-
matchResult_6 = 1;
|
|
347
|
-
}
|
|
348
|
-
} else {
|
|
349
|
-
matchResult_6 = 1;
|
|
350
|
-
}
|
|
351
|
-
} else {
|
|
352
|
-
matchResult_6 = 1;
|
|
353
|
-
}
|
|
354
|
-
switch (matchResult_6) {
|
|
355
|
-
case 0: {
|
|
356
|
-
restlist_mut = rest_8;
|
|
357
|
-
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_9.Key, unwrap(restoreCommentReplace(commentDict, v_9.Comment))), loopRead(yamlAstList_2, empty())), acc);
|
|
358
|
-
continue loopRead;
|
|
359
|
-
}
|
|
360
|
-
default: {
|
|
361
|
-
let matchResult_7, rest0_4, v_10, w, yamlAstList_3;
|
|
362
|
-
if (!isEmpty(restlist)) {
|
|
363
|
-
const activePatternResult_12 = $007CKey$007C_$007C(head(restlist));
|
|
364
|
-
if (activePatternResult_12 != null) {
|
|
365
|
-
if (!isEmpty(tail(restlist))) {
|
|
366
|
-
const activePatternResult_13 = $007CSequenceMinusOpener$007C_$007C(head(tail(restlist)));
|
|
367
|
-
if (activePatternResult_13 != null) {
|
|
368
|
-
if (!isEmpty(tail(tail(restlist)))) {
|
|
369
|
-
if (head(tail(tail(restlist))).tag === /* Intendation */
|
|
370
|
-
1) {
|
|
371
|
-
matchResult_7 = 0;
|
|
372
|
-
rest0_4 = tail(tail(tail(restlist)));
|
|
373
|
-
v_10 = value(activePatternResult_12);
|
|
374
|
-
w = value(activePatternResult_13);
|
|
375
|
-
yamlAstList_3 = head(tail(tail(restlist))).fields[0];
|
|
376
|
-
} else {
|
|
377
|
-
matchResult_7 = 1;
|
|
378
|
-
}
|
|
379
|
-
} else {
|
|
380
|
-
matchResult_7 = 1;
|
|
381
|
-
}
|
|
382
|
-
} else {
|
|
383
|
-
matchResult_7 = 1;
|
|
384
|
-
}
|
|
385
|
-
} else {
|
|
386
|
-
matchResult_7 = 1;
|
|
387
|
-
}
|
|
388
|
-
} else {
|
|
389
|
-
matchResult_7 = 1;
|
|
390
|
-
}
|
|
391
|
-
} else {
|
|
392
|
-
matchResult_7 = 1;
|
|
393
|
-
}
|
|
394
|
-
switch (matchResult_7) {
|
|
395
|
-
case 0: {
|
|
396
|
-
const c_3 = restoreCommentReplace(commentDict, v_10.Comment);
|
|
397
|
-
const objectList_2 = w.Value != null ? cons(PreprocessorElement_Line(value(w.Value)), yamlAstList_3) : yamlAstList_3;
|
|
398
|
-
const sequenceElements_4 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_4)));
|
|
399
|
-
const rest_9 = toList(skipWhile(isSequenceElement, rest0_4));
|
|
400
|
-
const seq = YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(objectList_2, empty())), delay(() => map$1((i_5) => loopRead(i_5, empty()), sequenceElements_4))))));
|
|
401
|
-
restlist_mut = rest_9;
|
|
402
|
-
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_10.Key, unwrap(c_3)), YAMLElement_Object(singleton$1(seq))), acc);
|
|
403
|
-
continue loopRead;
|
|
404
|
-
}
|
|
405
|
-
default: {
|
|
406
|
-
let matchResult_8, rest0_5, v_11, w_1;
|
|
407
|
-
if (!isEmpty(restlist)) {
|
|
408
|
-
const activePatternResult_14 = $007CKey$007C_$007C(head(restlist));
|
|
409
|
-
if (activePatternResult_14 != null) {
|
|
410
|
-
if (!isEmpty(tail(restlist))) {
|
|
411
|
-
const activePatternResult_15 = $007CSequenceMinusOpener$007C_$007C(head(tail(restlist)));
|
|
412
|
-
if (activePatternResult_15 != null) {
|
|
413
|
-
matchResult_8 = 0;
|
|
414
|
-
rest0_5 = tail(tail(restlist));
|
|
415
|
-
v_11 = value(activePatternResult_14);
|
|
416
|
-
w_1 = value(activePatternResult_15);
|
|
417
|
-
} else {
|
|
418
|
-
matchResult_8 = 1;
|
|
419
|
-
}
|
|
420
|
-
} else {
|
|
421
|
-
matchResult_8 = 1;
|
|
422
|
-
}
|
|
423
|
-
} else {
|
|
424
|
-
matchResult_8 = 1;
|
|
425
|
-
}
|
|
426
|
-
} else {
|
|
427
|
-
matchResult_8 = 1;
|
|
428
|
-
}
|
|
429
|
-
switch (matchResult_8) {
|
|
430
|
-
case 0: {
|
|
431
|
-
const c_4 = restoreCommentReplace(commentDict, v_11.Comment);
|
|
432
|
-
const sequenceElements_5 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_5)));
|
|
433
|
-
const rest_10 = toList(skipWhile(isSequenceElement, rest0_5));
|
|
434
|
-
const seq_1 = YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(singleton$1(PreprocessorElement_Line(value(w_1.Value))), empty())), delay(() => map$1((i_6) => loopRead(i_6, empty()), sequenceElements_5))))));
|
|
435
|
-
restlist_mut = rest_10;
|
|
436
|
-
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_11.Key, unwrap(c_4)), YAMLElement_Object(singleton$1(seq_1))), acc);
|
|
437
|
-
continue loopRead;
|
|
438
|
-
}
|
|
439
|
-
default: {
|
|
440
|
-
let matchResult_9, block_1, rest_12, v_13;
|
|
441
|
-
if (!isEmpty(restlist)) {
|
|
442
|
-
const activePatternResult_16 = $007CKeyValue$007C_$007C(head(restlist));
|
|
443
|
-
if (activePatternResult_16 != null) {
|
|
444
|
-
if (!isEmpty(tail(restlist))) {
|
|
445
|
-
if (head(tail(restlist)).tag === /* Intendation */
|
|
446
|
-
1) {
|
|
447
|
-
if (v_12 = value(activePatternResult_16), block = head(tail(restlist)).fields[0], v_12.Value === "|" ? true : v_12.Value === ">") {
|
|
448
|
-
matchResult_9 = 0;
|
|
449
|
-
block_1 = head(tail(restlist)).fields[0];
|
|
450
|
-
rest_12 = tail(tail(restlist));
|
|
451
|
-
v_13 = value(activePatternResult_16);
|
|
452
|
-
} else {
|
|
453
|
-
matchResult_9 = 1;
|
|
454
|
-
}
|
|
455
|
-
} else {
|
|
456
|
-
matchResult_9 = 1;
|
|
457
|
-
}
|
|
458
|
-
} else {
|
|
459
|
-
matchResult_9 = 1;
|
|
460
|
-
}
|
|
461
|
-
} else {
|
|
462
|
-
matchResult_9 = 1;
|
|
463
|
-
}
|
|
464
|
-
} else {
|
|
465
|
-
matchResult_9 = 1;
|
|
466
|
-
}
|
|
467
|
-
switch (matchResult_9) {
|
|
468
|
-
case 0: {
|
|
469
|
-
const blockValue = join("\n", flattenBlockScalar(block_1));
|
|
470
|
-
restlist_mut = rest_12;
|
|
471
|
-
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_13.Key), YAMLElement_Value(YAMLContent_create_27AED5E3(blockValue))), acc);
|
|
472
|
-
continue loopRead;
|
|
473
|
-
}
|
|
474
|
-
default:
|
|
475
|
-
if (isEmpty(restlist)) {
|
|
476
|
-
return YAMLElement_Object(reverse(acc));
|
|
477
|
-
} else {
|
|
478
|
-
const activePatternResult_17 = $007CKeyValue$007C_$007C(head(restlist));
|
|
479
|
-
if (activePatternResult_17 != null) {
|
|
480
|
-
const v_14 = value(activePatternResult_17);
|
|
481
|
-
restlist_mut = tail(restlist);
|
|
482
|
-
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_14.Key), loopRead(singleton$1(PreprocessorElement_Line(v_14.Value)), empty())), acc);
|
|
483
|
-
continue loopRead;
|
|
484
|
-
} else {
|
|
485
|
-
const activePatternResult_18 = $007CYamlComment$007C_$007C(head(restlist));
|
|
486
|
-
if (activePatternResult_18 != null) {
|
|
487
|
-
const v_15 = value(activePatternResult_18);
|
|
488
|
-
restlist_mut = tail(restlist);
|
|
489
|
-
acc_mut = cons(YAMLElement_Comment(getItemFromDict(commentDict, v_15.Comment)), acc);
|
|
490
|
-
continue loopRead;
|
|
491
|
-
} else {
|
|
492
|
-
const activePatternResult_19 = $007CYamlValue$007C_$007C(head(restlist));
|
|
493
|
-
if (activePatternResult_19 != null) {
|
|
494
|
-
const v_16 = value(activePatternResult_19);
|
|
495
|
-
restlist_mut = tail(restlist);
|
|
496
|
-
acc_mut = cons(YAMLElement_Value(YAMLContent_create_27AED5E3(restoreStringReplace(stringDict, v_16.Value), unwrap(restoreCommentReplace(commentDict, v_16.Comment)))), acc);
|
|
497
|
-
continue loopRead;
|
|
498
|
-
} else {
|
|
499
|
-
return toFail(printf("Unknown pattern: %A"))(restlist);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
break;
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
return loopRead(transformElements(defaultContext(stringDict), yamlList), empty());
|
|
527
|
-
}
|
|
528
|
-
function read(yaml) {
|
|
529
|
-
const ast = read$1(yaml);
|
|
530
|
-
const matchValue = ast.AST;
|
|
531
|
-
if (matchValue.tag === /* Level */
|
|
532
|
-
0) {
|
|
533
|
-
return tokenize(matchValue.fields[0], ast.StringMap, ast.CommentMap);
|
|
534
|
-
} else {
|
|
535
|
-
throw new Error("Not a root!");
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export { collectSequenceElements, isSequenceElement, read };
|