Repository navigation
Remove the S-expression parsetree printer - #8803
Conversation
The roundtrip test was its only user, and its AST comparison was redundant with the check that formatting is idempotent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1 Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1 Signed-off-by: Christoph Knittel <ck@cca.io>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42eea77a81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8803 |
First step of #8798.
res_parser -print sexpprinted the parsetree as an S-expression. Its only user was the formatter roundtrip test inscripts/test_syntax.sh, which formatted each file twice and checked two things:The parser is deterministic, so the second check holds whenever the first does. It never caught anything the text check didn't. The roundtrip test now only checks the text, and the printer goes. That's about 1,100 lines that every new parsetree node no longer has to handle.
The printer also printed the character offsets of explicit braces (
braces_loc, since #8678) and no other locations. That was unintended and isn't carried over anywhere.res_parser's other-printmodes (ast,comments,doc,ml,res,tokens) are unchanged.res_parserisn't shipped in the npm packages, so this doesn't affect users.🤖 Generated with Claude Code
https://claude.ai/code/session_013ZYFYMu3AE9P1xFVCR34d1