-
Notifications
You must be signed in to change notification settings - Fork 439
Rename eof to endOfFile #1842
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
Rename eof to endOfFile #1842
Conversation
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.
Hi @mininny and welcome to SwiftSyntax 🤩
Thanks for the PR.
I've added some inline comments. If there is any question please feel free to comment on them and I will try to help you.
CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift
Outdated
Show resolved
Hide resolved
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.
Thank you for the rename, and also cleaning up the special handling of eof
in CodeGeneration. It’s great to see that gone 🤩
CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift
Outdated
Show resolved
Hide resolved
@mininny could you rebase your PR instead of merge main into it. |
16ad3b0
to
2abcb73
Compare
Of course! I've rebased the changes to main 👍 |
@kimdv Hi, if the reviewed code is fine, I was wondering if this could be tested and merged 😄 |
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.
Thank you @mininny. This looks great. I’ll trigger CI and once that passes I’ll merge your PR.
@swift-ci Please test |
Looks like the code isn’t formatted using |
…e EOF tokens as part of the normal SYNTAX_TOKENS
2abcb73
to
1b11c7f
Compare
@swift-ci Please test |
Yep! I ran the swift formatter. Thanks |
Head branch was pushed to by a user without write access
1b11c7f
to
76d9e28
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
Resolves #1837
rdar://111217077
This PR renames eof(or EOF) to endOfFile.
I've also noticed there was a FIXME where
eof
was treated specially inSYNTAX_TOKENS
. I changed the TokenSpec to includeEndOfFile
as a regularSYNTAX_TOKENS
, and fixed places where eof was handled individually. In most cases, these special handlings could be covered with existing logic for other tokens.This is my first PR in swift-syntax, so please let me know if there's a better way to land these kind of changes.