-
Notifications
You must be signed in to change notification settings - Fork 140
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
Record variable declaration ranges #880
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.
LGTM
@@ -40,12 +40,13 @@ func (position Position) Shifted(length int) Position { | |||
} | |||
} | |||
|
|||
func (position Position) Hash() (result uint32) { |
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.
Was this not used?
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.
It had been previously used / was previously needed when we used a persistent map/set library that used this function for the key. We replaced it and removed the dependency a while ago, and this was a left-over
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 good!
Description
Record the ranges in which variable declarations are available, if position information is enabled (off by default).
This feature can be used to provide completion items in the language server.
Also, remove the unused
Hash
function forsema.Position
and the dependency onfasthash
.For contributor use:
master
branchFiles changed
in the Github PR explorer