go/internal/lsp/testdata/semantic
pjw 2db0265cb2 internal/lsp: in semantic tokens, better distinguish between types and variables
If A is a type, then in
type B {
  A
} it is a type, but in
type C {
  A int
 }
it is a variable (and similarly in function types). The old code got this wrong.

Fixes: golang/go#46068

Change-Id: Ib7320914de81d2b7377214f53f99f4fea25e00fb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/318749
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-05-11 14:51:35 +00:00
..
README.md internal/lsp: in semantic tokens, better distinguish between types and variables 2021-05-11 14:51:35 +00:00
a.go internal/lsp: revise some semantic token details 2020-11-24 12:36:21 +00:00
a.go.golden internal/lsp: add semantic tokens for comments and multiline strings 2021-05-05 16:20:51 +00:00
b.go internal/lsp: in semantic tokens, better distinguish between types and variables 2021-05-11 14:51:35 +00:00
b.go.golden internal/lsp: in semantic tokens, better distinguish between types and variables 2021-05-11 14:51:35 +00:00
semantic_test.go internal/lsp: add gopls semtok command and semantic token tests 2020-10-16 18:10:36 +00:00

README.md

The golden files are the output of gopls semtok <src-file>, with -- semantic -- inserted as the first line (the spaces are mandatory) and an extra newline at the end.