Skip to content

Lima 0.8.1 — outline() reads as the parser reads

Latest

Choose a tag to compare

@mkorun mkorun released this 06 Nov 05:20
· 3 commits to main since this release

Lima 0.8.1 reworks outline() inside the JavaScript package: the positions of keys and comments now come from the parser's own readers, as they read.

Changed

  • JavaScript: outline() reads positions as the parser reads. The readers for the top level, blocks, flow values and comments report each key and comment through a hook that only outline() sets, instead of outline() matching the parsed tree to the lines afterwards. It now grows linearly with its input: 2,048 malformed lines take 15 ms instead of 527. For a few malformed inputs the result is now right, where the old matching took a key from another line.

parse, parseCore and parseReferences keep their path and their speed; benchmarks on the host show no regression. Rust and Go are unchanged; their version follows the repository's.