DMS-XS-Parser
view release on metacpan or search on metacpan
(ac->position == DMS_COMMENT_INNER) ? "inner" :
(ac->position == DMS_COMMENT_TRAILING) ? "trailing" :
"floating";
hv_store(h, "position", 8, newSVpv(pos, 0), 0);
hv_store(h, "path", 4, path_to_sv(aTHX_ ac), 0);
av_push(av, newRV_noinc((SV *)h));
}
return newRV_noinc((SV *)av);
}
/* --- Direct DMS -> conformance JSON streaming emit -------------------------
*
* For workloads where the only consumer of the parse tree is a JSON-emit
* step (e.g. the conformance encoder, dms-tests harness), building the
* full Perl SV/HV/AV/Tie::IxHash tree just to walk it once is pure waste.
* `parse_to_json_bytes(src)` skips that round trip: it parses, then
* serializes the dms_value tree directly into a single Perl string buffer
* in C. No blessed sentinels, no IxHash tied magic, no per-leaf Perl call
* frame.
*
* Output shape matches encoder.pl's `encode_json_value` byte-for-byte at
( run in 1.396 second using v1.01-cache-2.11-cpan-140bd7fdf52 )