зеркало из https://github.com/golang/tools.git
e26dff9fb9
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. Fixes golang/go#66809 Fixes golang/go#70251 Change-Id: I15e59d10f5a9269bc6be87f30e3502a9054d88e7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/626279 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Peter Weinberger <pjw@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> |
||
---|---|---|
.. | ||
usage | ||
call_hierarchy.go | ||
capabilities_test.go | ||
check.go | ||
cmd.go | ||
codeaction.go | ||
codelens.go | ||
definition.go | ||
execute.go | ||
folding_range.go | ||
format.go | ||
help_test.go | ||
highlight.go | ||
implementation.go | ||
imports.go | ||
info.go | ||
integration_test.go | ||
links.go | ||
parsespan.go | ||
prepare_rename.go | ||
references.go | ||
remote.go | ||
rename.go | ||
semantictokens.go | ||
serve.go | ||
signature.go | ||
span.go | ||
spanformat_test.go | ||
stats.go | ||
subcommands.go | ||
symbols.go | ||
vulncheck.go | ||
workspace_symbol.go |