-
Notifications
You must be signed in to change notification settings - Fork 263
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
Use Token instead of IToken in lexical token locations #5957
Merged
keyboardDrummer
merged 9 commits into
dafny-lang:master
from
keyboardDrummer:lexicalTokenType
Dec 3, 2024
Merged
Use Token instead of IToken in lexical token locations #5957
keyboardDrummer
merged 9 commits into
dafny-lang:master
from
keyboardDrummer:lexicalTokenType
Dec 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MikaelMayer
previously approved these changes
Dec 3, 2024
keyboardDrummer
added a commit
that referenced
this pull request
Dec 3, 2024
…5956) This PR extract some refactorings from #5931 to make that PR easier to review. ### Description - Rename some things that are not lexical tokens, from Token to Origin. In particular, `Microsoft.Dafny.IToken` is now `Microsoft.Dafny.IOrigin`. Same renaming is done for classes that inherit from `IToken`, except `Token` and `RangeToken` - Extract two classes into separate files, `IOrigin` and `OriginWrapper` - Note: there are same locations where lexical tokens are handled, particularly in the parser and the formatter, where the name `IOrigin` does not make sense. That is addressed by this PR: #5957 ### How has this been tested? Pure refactoring, covered by existing tests <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
MikaelMayer
approved these changes
Dec 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extract some refactorings from #5931 to make that PR easier to review.
Description
Use Token instead of IToken in locations where we want to work with a lexical token. This only makes sense in conjunction with other changes. Namely I will rename
IToken
toIOrigin
(#5956) and makeToken
no longer inherit fromIOrigin
(future PR).How has this been tested?
Covered by existing tests
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.