-
Notifications
You must be signed in to change notification settings - Fork 262
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
Remove IncludeToken as prep for caching parsing #3858
Remove IncludeToken as prep for caching parsing #3858
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.
Looks like an excellent start ! I think I have a few comments to address or answer but shouldn't be very long till merge.
Source/DafnyLanguageServer/Workspace/Notifications/VerificationDiagnosticsParams.cs
Show resolved
Hide resolved
Co-authored-by: Mikaël Mayer <[email protected]>
… into removeIncludeToken
… into removeIncludeToken
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.
Getting closer! A few more items
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.
Great job and perseverance going through this refactoring!
)" This reverts commit eb45d23.
Currently a file that's included is parsed differently. Its tokens are wrapped in an
IncludeToken
, that includes a reference to the including file.To allow reusing parsed files in a cache, how the file is parsed should be independent of what triggered it to be parsed. To achieve that, this PR removes
IncludeToken
. To enable still determining whether a particular token was part of an include or not, tokens now store aUri
that uniquely identifies the document that token came from. The Uris of the root documents are stored inDefaultModuleDefinition
, which is just belowProgram
. Any token with a Uri that is not part of the root set is considered to be included.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.