Skip to content

Fix whitespace handling for synthetic tokens#731

Merged
doriable merged 2 commits into
mainfrom
fix-synth-token-whitespace
May 22, 2026
Merged

Fix whitespace handling for synthetic tokens#731
doriable merged 2 commits into
mainfrom
fix-synth-token-whitespace

Conversation

@doriable
Copy link
Copy Markdown
Member

This PR makes a fix to the ast/printer to account for synthetic
tokens when checking for whitespace trivia, skipping over them
when consulting for blank space for non-synthetic tokens.

It also expands the Edit API for adding declarations before,
so that we can test the behaviour of adding synthetic tokens
before non-synthetic definitions/declarations.

@doriable doriable requested a review from emcfarlane May 22, 2026 21:27
@doriable doriable merged commit 64e6ad0 into main May 22, 2026
10 checks passed
@doriable doriable deleted the fix-synth-token-whitespace branch May 22, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants