go/internal/lsp/testdata/semantic
Peter Weinbergr a9663296b1 internal/lsp: revise some semantic token details
There was a bug and inconsistency in how const identifiers were
categorized when being used. The new code always makes them readonly
variables.

The predeclared identifiers (true, false, nil, iota) were treated
inconsistently. The new code makes them all readonly variables.

Under rare conditions the output from gopls semtok was not syntactic
Go code because is would put a /* comment immediately after an
operator /, thereby generating a spurious line comment.

Fixes golang/go#42715

Change-Id: I5b1ccfaf607d6baa58c132e460c5617db6634a72
Reviewed-on: https://go-review.googlesource.com/c/tools/+/272208
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-11-24 12:36:21 +00:00
..
a.go internal/lsp: revise some semantic token details 2020-11-24 12:36:21 +00:00
a.go.golden internal/lsp: revise some semantic token details 2020-11-24 12:36:21 +00:00
b.go internal/lsp: revise some semantic token details 2020-11-24 12:36:21 +00:00
b.go.golden internal/lsp: revise some semantic token details 2020-11-24 12:36:21 +00:00
semantic_test.go