-
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
Rename some things that are not lexical tokens, from Token to Origin #5956
Rename some things that are not lexical tokens, from Token to Origin #5956
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.
document.querySelectorAll("button.load-diff-button").forEach(b => b.click())
was my friend for this one ! I like the new taxonomy much more than the previous one, thanks for the refactoring. Just a coment about variable renaming that you can skip if you prefer.
@@ -20,8 +20,8 @@ public MapComprehension(Cloner cloner, MapComprehension original) : base(cloner, | |||
Finite = original.Finite; | |||
} | |||
|
|||
public MapComprehension(IToken tok, RangeToken rangeToken, bool finite, List<BoundVar> bvars, Expression range, Expression/*?*/ termLeft, Expression termRight, Attributes attrs) | |||
: base(tok, rangeToken, bvars, range, termRight, attrs) { | |||
public MapComprehension(IOrigin tok, RangeToken rangeOrigin, bool finite, List<BoundVar> bvars, Expression range, Expression/*?*/ termLeft, Expression termRight, Attributes attrs) |
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.
I'm puzzled as I would that thought that you'd rename tok
to origin
but not that you'd rename rangeToken
to rangeOrigin
Anyway, these are parameter names so I presume they don't wieght a lot.
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.
I'll fix it in a follow-up. Hope that's OK.
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` to `IOrigin` (#5956) and make `Token` no longer inherit from `IOrigin` (future PR). ### How has this been tested? 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>
This PR extract some refactorings from #5931 to make that PR easier to review.
Description
Microsoft.Dafny.IToken
is nowMicrosoft.Dafny.IOrigin
. Same renaming is done for classes that inherit fromIToken
, exceptToken
andRangeToken
IOrigin
andOriginWrapper
IOrigin
does not make sense. That is addressed by this PR: Use Token instead of IToken in lexical token locations #5957How has this been tested?
Pure refactoring, covered by existing tests
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.