Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug assertions for node and trivia ranges #652

Open
dsherret opened this issue Jul 19, 2024 · 0 comments
Open

Add debug assertions for node and trivia ranges #652

dsherret opened this issue Jul 19, 2024 · 0 comments

Comments

@dsherret
Copy link
Member

Been bit by node ranges being incorrect in swc too many times. swc has a test suite for this (swc-project/swc#583), but it's not great because people often just do UPDATE=1 and overwrite the expected outputs with incorrect information.

I think it would be good to add debug only assertions for this in dprint that gets inserted into the gen_node call for debugging then have the assertions in a separate file. It should also be done for comments and tokens.

#650

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

No branches or pull requests

1 participant