-
-
Notifications
You must be signed in to change notification settings - Fork 219
feat!: Program range span entire source text #677
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
base: main
Are you sure you want to change the base?
Conversation
Is this ready to review? |
@fasttime Yes |
I tested this with ESLint and didn't see any incorrect behavior. A few unit tests were failing or no longer consistent (e.g., "should retrieve comments after a Program node"), but that's expected given the changes. The core logic and rule implementations appeared to be still working without additional modifications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Waiting for a second review.
There's a merge conflict now. |
Prerequisites checklist
Program's range currently works as follows:
What is the purpose of this pull request?
This PR updates Program’s range and loc so that they always cover the entire source text, regardless of tokens.
Program
range start is 0.Program
range end is length of the source text.loc
follows the same pattern. i.e.:loc.start
is always{ line: 1, column: 0 }
loc.end.line
is the number of lines in the source text.loc.end.column
is the number of characters in last line of source text.What changes did you make? (Give an overview)
Related Issues
Fix #648
Is there anything you'd like reviewers to focus on?