Repository navigation
An error shows the entry it came from, with carets; a golden program - #243
Merged
Merged
Conversation
tests/golden/shapes.py is a fixed program with one of each layout the tokenizer and the parser decide. D0-golden holds its token stream and the forms the parser emits, one a line, so a change in the engine's reader, a dialect or the parser shows as the lines it moved. A second parse in the same process is held to the same forms. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An error at the prompt printed its own line and nothing about where it was. Both loops now print the layout of a CPython traceback's last frame ahead of it: the line the entry began on, its text, and a caret under each character. The entry is what is known -- a token carries no position and an emitted form no line -- so a one-line entry is marked and a block is shown by its header with no carets. A program on standard input is reported by its own line number; an entry typed at the editor is line 1. The two loops share one entry runner. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Two commits.
An error shows where it came from
An error at the prompt printed its own line and nothing about where it was. Both loops now print the layout of a CPython traceback's last frame ahead of it:
Error:line is unchanged.%py-entry-run.Spec:
91-repl-editor, four new cases and one updated.A golden program
tests/golden/shapes.pyis a fixed program with one of each layout the tokenizer and the parser decide.D0-goldenholds its token stream and the forms the parser emits, one a line, so a change in the engine's reader, a dialect or the parser shows as the lines it moved. A second parse in the same process is held to the same forms.Verification
91-repl-editor(18 cases) andD0-golden(3 cases) pass on x-lang v0.58.0.🤖 Generated with Claude Code