You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gopls/internal/golang: semtok: use type information consistently
Previously there were two competing mechanisms for annotating
identifiers: the syntactic traversal and type information.
This meant that identifiers in different grammatical places
were annotated differently.
This change annotates identifiers using type information exclusively.
In addition to making things consistent, it also means that
types are reported independently (using modifiers) to symbol kind,
so, for example, a "var x func()" is a Variable with modifier
Signature, indicating that its type is a function.
Also, the rules for "defaultLibrary", "readonly", and so on
are more simply and consistently enforced.
The "deprecated" modifier is however lost as a consequence,
as it relied on the syntax.
+ Tests for both issues.
Also, use an enum for all the Modifiers.
Also, document the complete current set of token types
and modifiers that gopls returns.
Fixesgolang/go#66809Fixesgolang/go#70251
Change-Id: I15e59d10f5a9269bc6be87f30e3502a9054d88e7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/626279
Reviewed-by: Robert Findley <[email protected]>
Reviewed-by: Peter Weinberger <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
0 commit comments