yeptris 0.6.37.0-arm-linux-eabihf → 0.6.39.1-arm-linux-eabihf
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.
- checksums.yaml +4 -4
- data/lib/yeptris.rb +1 -1
- data/libyeptris.so +0 -0
- data/vendor/libyeptris/CMakeLists.txt +1 -1
- data/vendor/libyeptris/src/yeptris/emit/writer.c +44 -1
- data/vendor/libyeptris/src/yeptris/parse/engine.c +30 -7
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b550d3511828de23b6a8c925382eff1d637a9c8391ab8952ef7fbfa3b2d57549
|
|
4
|
+
data.tar.gz: bbe90991005ccb7718ecd3f465fe5563b937153c5ee39d02014baed5a52b725f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9e5c875e40a7220c4a9183f3f000a39d169b1462e425dc37d4cc1389cc2496d52b9d53746ee4759e47d1e2cbc9eea0f4af5e3cd910e085d6d893d3082b971dd
|
|
7
|
+
data.tar.gz: 331d2e087e1dc215eb0a5a3dc7e2f8a0e2ca9755ef49e201eed2c08a04c3931653850a26cfa7cf0af88ed99b02e14a14d6f6c9e4a018712d5ccdb234245d2f81
|
data/lib/yeptris.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Yeptris
|
|
4
4
|
# The gem's version lives in the parent namespace's file — the last
|
|
5
5
|
# internal require (yeptris/version) retired with it.
|
|
6
|
-
VERSION = "0.6.
|
|
6
|
+
VERSION = "0.6.39.1".freeze
|
|
7
7
|
|
|
8
8
|
# Informational notices are OPT-IN (yeptris-ruby#217): consumers
|
|
9
9
|
# embed yeptris inside CLIs that assert clean stderr, and a
|
data/libyeptris.so
CHANGED
|
Binary file
|
|
@@ -346,7 +346,37 @@ static void emit_literal(yep_writer* w, const yep_dnode* n, int parent_col) {
|
|
|
346
346
|
wr_indent(w, pad);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
|
|
349
|
+
/* The reader swallows the own break of a WHITESPACE-ONLY
|
|
350
|
+
* more-indented last line ("|+\n:\n \t\n\n\n" reads trail=2), so
|
|
351
|
+
* the spelling needs one extra break there -- written N reads N-1
|
|
352
|
+
* (the nightly's round 32, crash-90c98918: pass1
|
|
353
|
+
* "|+\n :\n \t\n\n" re-parsed one break short and the second
|
|
354
|
+
* pass emitted clip). A regular last line reads 1:1. */
|
|
355
|
+
uint32_t ls = body;
|
|
356
|
+
while (ls > 0 && p[ls - 1] != '\n') {
|
|
357
|
+
ls--;
|
|
358
|
+
}
|
|
359
|
+
int tab_last = 0;
|
|
360
|
+
int ws_last = 1;
|
|
361
|
+
for (uint32_t i = ls; i < body; i++) {
|
|
362
|
+
if (p[i] == '\t') {
|
|
363
|
+
tab_last = 1;
|
|
364
|
+
} else if (p[i] != ' ') {
|
|
365
|
+
ws_last = 0;
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/* the reader swallows the own break of a whitespace-only last line
|
|
370
|
+
* that carries a TAB (the tab-indent law shifts the line's content
|
|
371
|
+
* start): "|+\n:\n \t\n\n\n" reads trail=2 where a spaces-only
|
|
372
|
+
* line reads 1:1 (the nightly's round 32, crash-90c98918: pass1
|
|
373
|
+
* "|+\n :\n \t\n\n" re-parsed one break short and the second
|
|
374
|
+
* pass emitted clip). One extra break spells the tab case — and
|
|
375
|
+
* ONLY that case: a CONTENT last line that merely carries a tab
|
|
376
|
+
* ("|+\n \t:\n..." — the round-33 composite, crash-306b67eb)
|
|
377
|
+
* reads its own break 1:1, and the extra break made the value
|
|
378
|
+
* GROW one break per pass. */
|
|
379
|
+
for (uint32_t i = 0; i < trail + ((tab_last && ws_last) ? 1 : 0); i++) {
|
|
350
380
|
wr_byte(w, '\n');
|
|
351
381
|
}
|
|
352
382
|
}
|
|
@@ -663,6 +693,19 @@ static void emit_anchor_ex(yep_emitter* em, const yep_dnode* n) {
|
|
|
663
693
|
if (n->anchor.len == 0) {
|
|
664
694
|
return;
|
|
665
695
|
}
|
|
696
|
+
/* A name ending in ':' rides or separates context-dependently
|
|
697
|
+
* (2SXE): spelled directly before a collection ("&: [[]]", the
|
|
698
|
+
* nightly's round 31, crash-66a513ea; "k: &: [[1]]" fails its own
|
|
699
|
+
* re-parse the same way) every spelling re-lexes differently --
|
|
700
|
+
* the riding/yield law reads the colon as the key indicator at
|
|
701
|
+
* the follower, so the tree changes or the parse dies. A scalar
|
|
702
|
+
* node keeps riding raw ("k: &n: v" round-trips byte-stably).
|
|
703
|
+
* There is no spell for the collection form: fail the serialize. */
|
|
704
|
+
yep_view chk = wv(w, n->anchor);
|
|
705
|
+
if (n->kind != 0 && chk.len > 0 && chk.p[chk.len - 1] == ':') {
|
|
706
|
+
w->unserializable = 1;
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
666
709
|
wr_byte(w, '&');
|
|
667
710
|
yep_view adec = wv(w, n->anchor);
|
|
668
711
|
if (w->canonical) {
|
|
@@ -1276,10 +1276,12 @@ static void e_props(yep_engine* e, yep_view* anchor, yep_view* tag) {
|
|
|
1276
1276
|
return;
|
|
1277
1277
|
}
|
|
1278
1278
|
/* The flow-follower colon law (the nightly's round 29,
|
|
1279
|
-
* crash-47eb4054
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
*
|
|
1279
|
+
* crash-47eb4054; the block-header twin is round 31,
|
|
1280
|
+
* crash-4cbeede1): a name ending at a riding colon whose
|
|
1281
|
+
* follower is a FLOW collection or a BLOCK SCALAR HEADER
|
|
1282
|
+
* un-consumes the colon. libyaml ACCEPTS "&k2: [1,\n2]"
|
|
1283
|
+
* and "&kk: |\n x" — the anchor names the implicit-null
|
|
1284
|
+
* KEY and the collection/scalar is the value — so the
|
|
1283
1285
|
* riding law (2SXE) must yield exactly where its result
|
|
1284
1286
|
* is observable in the differential; the plain-led twins
|
|
1285
1287
|
* keep it (libyaml rejects those: "&a: key: v", W5VH's
|
|
@@ -1287,11 +1289,32 @@ static void e_props(yep_engine* e, yep_view* anchor, yep_view* tag) {
|
|
|
1287
1289
|
* re-lexes as the key indicator and the existing colon
|
|
1288
1290
|
* arm builds the anchored null key. */
|
|
1289
1291
|
if (e->p[e->pos - 1] == ':') {
|
|
1292
|
+
/* the follower scan crosses blanks, breaks AND
|
|
1293
|
+
* comments: the pair separator at line end still opens
|
|
1294
|
+
* the value on a later line ("&k:\n {\n}" — the
|
|
1295
|
+
* nightly's round 31, crash-c2232e17 — rode the colon
|
|
1296
|
+
* and DROPPED the flow map; "&: #c\n|\nA" — round
|
|
1297
|
+
* 32's crash-d580b467 — stopped at the comment, rode
|
|
1298
|
+
* the colon into the anchor name and pass1/pass2
|
|
1299
|
+
* spelled different trees). A comment is
|
|
1300
|
+
* blank-equivalent here: skip it to its break and keep
|
|
1301
|
+
* scanning. */
|
|
1290
1302
|
size_t t = e->pos;
|
|
1291
|
-
|
|
1292
|
-
t
|
|
1303
|
+
for (;;) {
|
|
1304
|
+
while (t < e->len && (e->p[t] == ' ' || e->p[t] == '\t' || e->p[t] == '\n' ||
|
|
1305
|
+
e->p[t] == '\r')) {
|
|
1306
|
+
t++;
|
|
1307
|
+
}
|
|
1308
|
+
if (t < e->len && e->p[t] == '#') {
|
|
1309
|
+
while (t < e->len && e->p[t] != '\n' && e->p[t] != '\r') {
|
|
1310
|
+
t++;
|
|
1311
|
+
}
|
|
1312
|
+
continue;
|
|
1313
|
+
}
|
|
1314
|
+
break;
|
|
1293
1315
|
}
|
|
1294
|
-
if (t < e->len &&
|
|
1316
|
+
if (t < e->len &&
|
|
1317
|
+
(e->p[t] == '[' || e->p[t] == '{' || e->p[t] == '|' || e->p[t] == '>')) {
|
|
1295
1318
|
anchor->len -= 1;
|
|
1296
1319
|
e->pos -= 1;
|
|
1297
1320
|
}
|