@nfdi4plants/arctrl 3.0.0 → 3.0.3
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/Basic.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Basic.js +6 -6
- package/dist/ts/ts/Conversion/Workflow.js +3 -3
- package/dist/ts/ts/Core/DataContext.d.ts +21 -29
- package/dist/ts/ts/Core/DataContext.d.ts.map +1 -1
- package/dist/ts/ts/Core/DataContext.js +70 -84
- package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Core/Datamap.js +9 -10
- package/dist/ts/ts/Json/Datamap/DataContext.d.ts.map +1 -1
- package/dist/ts/ts/Json/Datamap/DataContext.js +6 -6
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.js +1 -1
- package/dist/ts/ts/ROCrateIO.d.ts +1 -0
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +6 -3
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapColumn.js +1 -2
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapHeader.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapHeader.js +6 -7
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.js +2 -2
- 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.5}/Encode.fs.js +9 -9
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/Escapes.fs.js +313 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.5}/FlowToBlock.fs.js +14 -12
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/Persil.fs.js +562 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.5}/Preprocessing.fs.js +52 -12
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/Reader.fs.js +1314 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.5}/Regex.fs.js +7 -1
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/RegexActivePatterns.fs.js +313 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/StringBuffer.fs.js +60 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/Writer.fs.js +391 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/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.5}/Decode.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.3 → YAMLicious.1.0.0-alpha.5}/Interop/JsInterop.fs.js +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { value, defaultArg, map } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
2
|
+
import { PreprocessorElement_Level, PreprocessorElement_Line, PreprocessorElement_Intendation, PreprocessorElement_Nil, WriterOptions_get_Default } from './YAMLiciousTypes.fs.js';
|
|
3
|
+
import { forAll, toList, delay, collect, singleton, map as map$2 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
4
|
+
import { map as map$1, ofArray, singleton as singleton$1 } from '../../../node_modules/@fable-org/fable-library-js/List.js';
|
|
5
|
+
import { replace, join, trimEnd, substring, split } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
6
|
+
import { int32ToString } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
7
|
+
import { write as write$1 } from './Preprocessing.fs.js';
|
|
8
|
+
|
|
9
|
+
function StyleVerifier_isInlineSimpleScalar(v) {
|
|
10
|
+
if (!(v.Value.indexOf("\n") >= 0) && v.Comment == null) {
|
|
11
|
+
const matchValue = v.Style;
|
|
12
|
+
let matchResult;
|
|
13
|
+
if (matchValue != null) {
|
|
14
|
+
switch (value(matchValue).tag) {
|
|
15
|
+
case /* Block */
|
|
16
|
+
3: {
|
|
17
|
+
matchResult = 1;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
default:
|
|
21
|
+
matchResult = 0;
|
|
22
|
+
}
|
|
23
|
+
} else {
|
|
24
|
+
matchResult = 0;
|
|
25
|
+
}
|
|
26
|
+
switch (matchResult) {
|
|
27
|
+
case 0:
|
|
28
|
+
return true;
|
|
29
|
+
default:
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
} else {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function StyleVerifier_checkInlineSequence(ele) {
|
|
37
|
+
return forAll((x) => {
|
|
38
|
+
if (x.tag === /* Value */
|
|
39
|
+
1) {
|
|
40
|
+
return StyleVerifier_isInlineSimpleScalar(x.fields[0]);
|
|
41
|
+
} else {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}, ele);
|
|
45
|
+
}
|
|
46
|
+
function Formatting_mkComment(comment) {
|
|
47
|
+
return "#" + comment;
|
|
48
|
+
}
|
|
49
|
+
function Formatting_mkKey(key) {
|
|
50
|
+
return key + ":";
|
|
51
|
+
}
|
|
52
|
+
function Formatting_mkMinusLine(c) {
|
|
53
|
+
return "- " + c;
|
|
54
|
+
}
|
|
55
|
+
function Formatting_mkTag(tag) {
|
|
56
|
+
let s;
|
|
57
|
+
if (tag != null) {
|
|
58
|
+
if (value(tag) === "!") {
|
|
59
|
+
return "! ";
|
|
60
|
+
} else if (s = value(tag), s.startsWith("!") && !s.startsWith("!!")) {
|
|
61
|
+
const s_1 = value(tag);
|
|
62
|
+
return s_1 + " ";
|
|
63
|
+
} else {
|
|
64
|
+
const s_2 = value(tag);
|
|
65
|
+
return "!<" + s_2 + "> ";
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
return "";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function Formatting_mkAnchor(anchor) {
|
|
72
|
+
return defaultArg(map((s) => "&" + s + " ", anchor), "");
|
|
73
|
+
}
|
|
74
|
+
function Formatting_mkNodePrefix(content) {
|
|
75
|
+
return Formatting_mkTag(content.Tag) + Formatting_mkAnchor(content.Anchor);
|
|
76
|
+
}
|
|
77
|
+
function Formatting_appendOptionalComment(comment, s) {
|
|
78
|
+
return s + defaultArg(map((c) => " " + Formatting_mkComment(c), comment), "");
|
|
79
|
+
}
|
|
80
|
+
function Formatting_appendComment(content, s) {
|
|
81
|
+
return Formatting_appendOptionalComment(content.Comment, s);
|
|
82
|
+
}
|
|
83
|
+
function Formatting_escapeSingleQuoted(s) {
|
|
84
|
+
return replace(s, "'", "''");
|
|
85
|
+
}
|
|
86
|
+
function Formatting_escapeDoubleQuoted(s) {
|
|
87
|
+
return replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(s, "\\", "\\\\"), '"', '\\"'), "\0", "\\0"), "\x07", "\\a"), "\b", "\\b"), " ", "\\t"), "\v", "\\v"), "\f", "\\f"), "\r", "\\r"), "\x1B", "\\e"), "
", "\\N"), " ", "\\_"), "\u2028", "\\L"), "\u2029", "\\P"), "\n", "\\n");
|
|
88
|
+
}
|
|
89
|
+
function Formatting_normalizeNewlines(s) {
|
|
90
|
+
return replace(s, "\r\n", "\n");
|
|
91
|
+
}
|
|
92
|
+
function Formatting_resolveBlockStyle(options, content) {
|
|
93
|
+
const matchValue_1 = content.Style;
|
|
94
|
+
let matchResult, chomp, indent, style;
|
|
95
|
+
if (options.PreserveScalarStyle) {
|
|
96
|
+
if (matchValue_1 != null) {
|
|
97
|
+
if (value(matchValue_1).tag === /* Block */
|
|
98
|
+
3) {
|
|
99
|
+
matchResult = 0;
|
|
100
|
+
chomp = value(matchValue_1).fields[1];
|
|
101
|
+
indent = value(matchValue_1).fields[2];
|
|
102
|
+
style = value(matchValue_1).fields[0];
|
|
103
|
+
} else {
|
|
104
|
+
matchResult = 1;
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
matchResult = 1;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
matchResult = 1;
|
|
111
|
+
}
|
|
112
|
+
switch (matchResult) {
|
|
113
|
+
case 0:
|
|
114
|
+
return [style, chomp, indent];
|
|
115
|
+
default:
|
|
116
|
+
return [options.MultilineFallbackStyle, options.MultilineFallbackChomping, void 0];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function Formatting_scalarToInlineText(options, content) {
|
|
120
|
+
const v = content.Value;
|
|
121
|
+
if (options.PreserveScalarStyle) {
|
|
122
|
+
const matchValue = content.Style;
|
|
123
|
+
let matchResult;
|
|
124
|
+
if (matchValue != null) {
|
|
125
|
+
switch (value(matchValue).tag) {
|
|
126
|
+
case /* SingleQuoted */
|
|
127
|
+
1: {
|
|
128
|
+
matchResult = 0;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case /* DoubleQuoted */
|
|
132
|
+
2: {
|
|
133
|
+
matchResult = 1;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
default:
|
|
137
|
+
matchResult = 2;
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
matchResult = 2;
|
|
141
|
+
}
|
|
142
|
+
switch (matchResult) {
|
|
143
|
+
case 0:
|
|
144
|
+
return "'" + Formatting_escapeSingleQuoted(v) + "'";
|
|
145
|
+
case 1:
|
|
146
|
+
return '"' + Formatting_escapeDoubleQuoted(v) + '"';
|
|
147
|
+
default:
|
|
148
|
+
return v;
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
return v;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function Formatting_mkKeyContent(options, content) {
|
|
155
|
+
return Formatting_mkNodePrefix(content) + Formatting_scalarToInlineText(options, content);
|
|
156
|
+
}
|
|
157
|
+
function Formatting_mkMappingKey(options, key) {
|
|
158
|
+
return Formatting_mkKey(Formatting_mkKeyContent(options, key));
|
|
159
|
+
}
|
|
160
|
+
function Formatting_shouldEmitBlockScalar(options, content) {
|
|
161
|
+
const hasMultiline = content.Value.indexOf("\n") >= 0;
|
|
162
|
+
const matchValue_1 = content.Style;
|
|
163
|
+
let matchResult;
|
|
164
|
+
if (options.PreserveScalarStyle) {
|
|
165
|
+
if (matchValue_1 != null) {
|
|
166
|
+
if (value(matchValue_1).tag === /* Block */
|
|
167
|
+
3) {
|
|
168
|
+
matchResult = 0;
|
|
169
|
+
} else {
|
|
170
|
+
matchResult = 1;
|
|
171
|
+
}
|
|
172
|
+
} else {
|
|
173
|
+
matchResult = 1;
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
matchResult = 1;
|
|
177
|
+
}
|
|
178
|
+
switch (matchResult) {
|
|
179
|
+
case 0:
|
|
180
|
+
return true;
|
|
181
|
+
default:
|
|
182
|
+
return hasMultiline;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function Formatting_mkInlineContent(options, content) {
|
|
186
|
+
const inlineScalar = Formatting_scalarToInlineText(options, content);
|
|
187
|
+
return Formatting_appendComment(content, Formatting_mkNodePrefix(content) + inlineScalar);
|
|
188
|
+
}
|
|
189
|
+
function Formatting_mkInlineSequence(options, seq) {
|
|
190
|
+
return "[" + join(", ", map$1((x) => {
|
|
191
|
+
if (x.tag === /* Value */
|
|
192
|
+
1) {
|
|
193
|
+
const v = x.fields[0];
|
|
194
|
+
return Formatting_mkNodePrefix(v) + Formatting_scalarToInlineText(options, v);
|
|
195
|
+
} else {
|
|
196
|
+
throw new Error("Invalid sequence element");
|
|
197
|
+
}
|
|
198
|
+
}, seq)) + "]";
|
|
199
|
+
}
|
|
200
|
+
function Formatting_mkBlockHeader(style, chomp, indent) {
|
|
201
|
+
return (style.tag === /* Folded */
|
|
202
|
+
1 ? ">" : "|") + defaultArg(map(int32ToString, indent), "") + (chomp.tag === /* Clip */
|
|
203
|
+
1 ? "" : chomp.tag === /* Keep */
|
|
204
|
+
2 ? "+" : "-");
|
|
205
|
+
}
|
|
206
|
+
function Formatting_bodyTextForChomping(chomp, value) {
|
|
207
|
+
const normalized = Formatting_normalizeNewlines(value);
|
|
208
|
+
switch (chomp.tag) {
|
|
209
|
+
case /* Clip */
|
|
210
|
+
1:
|
|
211
|
+
case /* Keep */
|
|
212
|
+
2:
|
|
213
|
+
if (normalized.endsWith("\n")) {
|
|
214
|
+
return substring(normalized, 0, normalized.length - 1);
|
|
215
|
+
} else {
|
|
216
|
+
return normalized;
|
|
217
|
+
}
|
|
218
|
+
default:
|
|
219
|
+
return trimEnd(normalized, "\n");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function Formatting_splitPreservingEmpty(s) {
|
|
223
|
+
return ofArray(split(s, ["\n"], void 0, 0));
|
|
224
|
+
}
|
|
225
|
+
function Formatting_mkBlockScalarMapping(options, key, content) {
|
|
226
|
+
const patternInput = Formatting_resolveBlockStyle(options, content);
|
|
227
|
+
const chomp = patternInput[1];
|
|
228
|
+
const header = Formatting_mkBlockHeader(patternInput[0], chomp, patternInput[2]);
|
|
229
|
+
const lines = Formatting_splitPreservingEmpty(Formatting_bodyTextForChomping(chomp, content.Value));
|
|
230
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendComment(content, Formatting_mkMappingKey(options, key) + " " + Formatting_mkNodePrefix(content) + header)), PreprocessorElement_Intendation(map$1(PreprocessorElement_Line, lines))]));
|
|
231
|
+
}
|
|
232
|
+
function Formatting_mkBlockScalarSequenceItem(options, content) {
|
|
233
|
+
const patternInput = Formatting_resolveBlockStyle(options, content);
|
|
234
|
+
const chomp = patternInput[1];
|
|
235
|
+
const header = Formatting_mkBlockHeader(patternInput[0], chomp, patternInput[2]);
|
|
236
|
+
const lines = Formatting_splitPreservingEmpty(Formatting_bodyTextForChomping(chomp, content.Value));
|
|
237
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendComment(content, "- " + Formatting_mkNodePrefix(content) + header)), PreprocessorElement_Intendation(map$1(PreprocessorElement_Line, lines))]));
|
|
238
|
+
}
|
|
239
|
+
function Formatting_mkBlockScalarRoot(options, content) {
|
|
240
|
+
const patternInput = Formatting_resolveBlockStyle(options, content);
|
|
241
|
+
const chomp = patternInput[1];
|
|
242
|
+
const header = Formatting_mkBlockHeader(patternInput[0], chomp, patternInput[2]);
|
|
243
|
+
const lines = Formatting_splitPreservingEmpty(Formatting_bodyTextForChomping(chomp, content.Value));
|
|
244
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendComment(content, Formatting_mkNodePrefix(content) + header)), PreprocessorElement_Intendation(map$1(PreprocessorElement_Line, lines))]));
|
|
245
|
+
}
|
|
246
|
+
function detokenizeWithOptions(options, ele) {
|
|
247
|
+
const loop = (ele_1) => {
|
|
248
|
+
switch (ele_1.tag) {
|
|
249
|
+
case /* Mapping */
|
|
250
|
+
0: {
|
|
251
|
+
const key = ele_1.fields[0];
|
|
252
|
+
const v = ele_1.fields[1];
|
|
253
|
+
let matchResult, value_2, value_3, seq_1, anyElse;
|
|
254
|
+
if (key.Comment != null) {
|
|
255
|
+
matchResult = 0;
|
|
256
|
+
} else {
|
|
257
|
+
switch (v.tag) {
|
|
258
|
+
case /* Value */
|
|
259
|
+
1: {
|
|
260
|
+
if (Formatting_shouldEmitBlockScalar(options, v.fields[0])) {
|
|
261
|
+
matchResult = 1;
|
|
262
|
+
value_2 = v.fields[0];
|
|
263
|
+
} else {
|
|
264
|
+
matchResult = 2;
|
|
265
|
+
value_3 = v.fields[0];
|
|
266
|
+
}
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
case /* Sequence */
|
|
270
|
+
2: {
|
|
271
|
+
if (StyleVerifier_checkInlineSequence(v.fields[0])) {
|
|
272
|
+
matchResult = 3;
|
|
273
|
+
seq_1 = v.fields[0];
|
|
274
|
+
} else {
|
|
275
|
+
matchResult = 4;
|
|
276
|
+
anyElse = v;
|
|
277
|
+
}
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
default: {
|
|
281
|
+
matchResult = 4;
|
|
282
|
+
anyElse = v;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
switch (matchResult) {
|
|
287
|
+
case 0:
|
|
288
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendOptionalComment(key.Comment, Formatting_mkMappingKey(options, key))), PreprocessorElement_Intendation(singleton$1(loop(v)))]));
|
|
289
|
+
case 1:
|
|
290
|
+
return Formatting_mkBlockScalarMapping(options, key, value_2);
|
|
291
|
+
case 2:
|
|
292
|
+
return PreprocessorElement_Line(Formatting_mkMappingKey(options, key) + " " + Formatting_mkInlineContent(options, value_3));
|
|
293
|
+
case 3:
|
|
294
|
+
return PreprocessorElement_Line(Formatting_mkMappingKey(options, key) + " " + Formatting_mkInlineSequence(options, seq_1));
|
|
295
|
+
default:
|
|
296
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_mkMappingKey(options, key)), PreprocessorElement_Intendation(singleton$1(loop(anyElse)))]));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
case /* Value */
|
|
300
|
+
1:
|
|
301
|
+
if (Formatting_shouldEmitBlockScalar(options, ele_1.fields[0])) {
|
|
302
|
+
const value_4 = ele_1.fields[0];
|
|
303
|
+
return Formatting_mkBlockScalarRoot(options, value_4);
|
|
304
|
+
} else {
|
|
305
|
+
const value_5 = ele_1.fields[0];
|
|
306
|
+
return PreprocessorElement_Line(Formatting_mkInlineContent(options, value_5));
|
|
307
|
+
}
|
|
308
|
+
case /* Object */
|
|
309
|
+
3: {
|
|
310
|
+
const seq_2 = ele_1.fields[0];
|
|
311
|
+
return PreprocessorElement_Level(toList(delay(() => map$2(loop, seq_2))));
|
|
312
|
+
}
|
|
313
|
+
case /* Sequence */
|
|
314
|
+
2: {
|
|
315
|
+
const seq_3 = ele_1.fields[0];
|
|
316
|
+
return PreprocessorElement_Level(toList(delay(() => collect((element_1) => {
|
|
317
|
+
const matchValue = element_1;
|
|
318
|
+
let matchResult_1, value_7, value_8, nested_1, anyElse_1;
|
|
319
|
+
switch (matchValue.tag) {
|
|
320
|
+
case /* Value */
|
|
321
|
+
1: {
|
|
322
|
+
if (Formatting_shouldEmitBlockScalar(options, matchValue.fields[0])) {
|
|
323
|
+
matchResult_1 = 0;
|
|
324
|
+
value_7 = matchValue.fields[0];
|
|
325
|
+
} else {
|
|
326
|
+
matchResult_1 = 1;
|
|
327
|
+
value_8 = matchValue.fields[0];
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
case /* Sequence */
|
|
332
|
+
2: {
|
|
333
|
+
if (StyleVerifier_checkInlineSequence(matchValue.fields[0])) {
|
|
334
|
+
matchResult_1 = 2;
|
|
335
|
+
nested_1 = matchValue.fields[0];
|
|
336
|
+
} else {
|
|
337
|
+
matchResult_1 = 3;
|
|
338
|
+
anyElse_1 = matchValue;
|
|
339
|
+
}
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
default: {
|
|
343
|
+
matchResult_1 = 3;
|
|
344
|
+
anyElse_1 = matchValue;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
switch (matchResult_1) {
|
|
348
|
+
case 0:
|
|
349
|
+
return singleton(Formatting_mkBlockScalarSequenceItem(options, value_7));
|
|
350
|
+
case 1:
|
|
351
|
+
return singleton(PreprocessorElement_Line(Formatting_mkMinusLine(Formatting_mkInlineContent(options, value_8))));
|
|
352
|
+
case 2:
|
|
353
|
+
return singleton(PreprocessorElement_Line(Formatting_mkMinusLine(Formatting_mkInlineSequence(options, nested_1))));
|
|
354
|
+
default:
|
|
355
|
+
return singleton(PreprocessorElement_Level(ofArray([PreprocessorElement_Line("-"), PreprocessorElement_Intendation(singleton$1(loop(anyElse_1)))])));
|
|
356
|
+
}
|
|
357
|
+
}, seq_3))));
|
|
358
|
+
}
|
|
359
|
+
case /* Comment */
|
|
360
|
+
4: {
|
|
361
|
+
const c = ele_1.fields[0];
|
|
362
|
+
return PreprocessorElement_Line(Formatting_mkComment(c));
|
|
363
|
+
}
|
|
364
|
+
case /* DocumentStart */
|
|
365
|
+
5:
|
|
366
|
+
return PreprocessorElement_Line("---");
|
|
367
|
+
case /* DocumentEnd */
|
|
368
|
+
6:
|
|
369
|
+
return PreprocessorElement_Line("...");
|
|
370
|
+
case /* Alias */
|
|
371
|
+
7: {
|
|
372
|
+
const a = ele_1.fields[0];
|
|
373
|
+
return PreprocessorElement_Line("*" + a);
|
|
374
|
+
}
|
|
375
|
+
default:
|
|
376
|
+
return PreprocessorElement_Nil();
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
return loop(ele);
|
|
380
|
+
}
|
|
381
|
+
function detokenize(ele) {
|
|
382
|
+
return detokenizeWithOptions(WriterOptions_get_Default(), ele);
|
|
383
|
+
}
|
|
384
|
+
function writeWithOptions(ele, writerOptions, fconfig) {
|
|
385
|
+
return write$1(detokenizeWithOptions(writerOptions, ele), fconfig);
|
|
386
|
+
}
|
|
387
|
+
function write(ele, fconfig) {
|
|
388
|
+
return writeWithOptions(ele, WriterOptions_get_Default(), fconfig);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export { Formatting_appendOptionalComment, Formatting_mkBlockScalarMapping, Formatting_mkBlockScalarRoot, Formatting_mkBlockScalarSequenceItem, Formatting_mkComment, Formatting_mkInlineContent, Formatting_mkInlineSequence, Formatting_mkKey, Formatting_mkKeyContent, Formatting_mkMappingKey, Formatting_mkMinusLine, Formatting_mkNodePrefix, Formatting_resolveBlockStyle, Formatting_shouldEmitBlockScalar, StyleVerifier_checkInlineSequence, detokenize, detokenizeWithOptions, write, writeWithOptions };
|