Repository navigation
refactor(parser): place an error at a multi-line string in the reconciler - #3068
Merged
Merged
Conversation
Contributor
📊 Benchmark Results
vs base, measured in this run
A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: What do these numbers mean?
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
…iler convert.rs's hand-modeled report_at_multi_line_string_ends (#2994) moved an error whose statement fails at or after a string running over a line end to the line beancount reports it on, from its own reading of the header grammar. The error oracle already knows that line: it is the line of the beancount error the rledger error stands for. The pass is deleted. The reconciler moves a syntax error that starts on a line with no slot of its own, and holds (or ends right at) a slot the reference reports on a later line, to that line, when the text between can be one statement: reconcile's new one_statement argument, which the beancount frontend answers by checking every line end between is inside a string. Its end and message stay. No output changes: parity 122,378 of 123,394, the BOM matrix, the corpus baselines and the parser suite are unchanged. WASM cache v153. Co-Authored-By: Claude Opus 5.5 <[email protected]>
robcohen
force-pushed
the
fix/multiline-string-ends
branch
from
November 27, 2026 22:24
21ac622 to
00fdaae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves
report_at_multi_line_string_ends(#2994) from convert.rs into the error oracle's reconciler.The pass reported an error whose statement fails at or after a string that runs over a line end on the line where beancount reports it. It found that line from its own reading of the header grammar. The oracle already knows the line: it is the line of the beancount error the rledger error stands for.
reconcile: a syntax error that meets all of these moves to the slot's line, keeping its end and message:one_statement(from, to): keeps the reconciler format-neutral. The beancount frontend answers it withline_ends_inside_strings, which checks that every line end in the range is inside a string (backslash escapes honoured; linear in the range).Other) are not moved, as before. An indented line after a gap fails at its indent, which is a slot on its own line, so it stays.test_reconcile_moves_an_error_to_its_slots_later_line.Gates
No output changes:
STRICT_BASELINEand the parser suite are unchanged, includingmulti_line_string_error_line.rsandbison_recovery_model.rs;-D warningsis clean;Caches
WASM cache v153. This PR is independent of the others; the numbers assume this merge order: #3065 (v151), #3067 (v152), this PR (v153), #3066 (v154), then the
quiet_after_invalid_tokensdeletion (v155). I'll renumber if the order changes.🤖 Generated with Claude Code