X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fgolang.org%2Fx%2Ftools%40v0.0.0-20201105173854-bc9fc8d8c4bc%2Finternal%2Flsp%2Ftestdata%2Fsemantic%2Fa.go;fp=.config%2Fcoc%2Fextensions%2Fcoc-go-data%2Ftools%2Fpkg%2Fmod%2Fgolang.org%2Fx%2Ftools%40v0.0.0-20201105173854-bc9fc8d8c4bc%2Finternal%2Flsp%2Ftestdata%2Fsemantic%2Fa.go;h=a8c7d995afb515a31ab082b774f4a686b55ee162;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hp=0000000000000000000000000000000000000000;hpb=b3950616b54221c40a7dab9099bda675007e5b6e;p=dotfiles%2F.git diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/internal/lsp/testdata/semantic/a.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/internal/lsp/testdata/semantic/a.go new file mode 100644 index 00000000..a8c7d995 --- /dev/null +++ b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201105173854-bc9fc8d8c4bc/internal/lsp/testdata/semantic/a.go @@ -0,0 +1,78 @@ +package semantictokens + +import ( + _ "encoding/utf8" + utf "encoding/utf8" + "fmt" //@ semantic("fmt") + . "fmt" + "unicode/utf8" +) + +var ( + a = fmt.Print + b []string = []string{"foo"} + c1 chan int + c2 <-chan int + c3 = make([]chan<- int) + b = A{X: 23} + m map[bool][3]*float64 +) + +const ( + xx F = iota + yy = xx + 3 + zz = "" + ww = "not " + zz +) + +type A struct { + X int `foof` +} +type B interface { + A + sad(int) bool +} + +type F int + +func (a *A) f() bool { + var z string + x := "foo" + a(x) + y := "bar" + x + switch z { + case "xx": + default: + } + select { + case z := <-c3[0]: + default: + } + for k, v := range m { + return (!k) && v[0] == nil + } + c2 <- A.X + w := b[4:] + j := len(x) + j-- + return true +} + +func g(vv ...interface{}) { + ff := func() {} + defer ff() + go utf.RuneCount("") + go utf8.RuneCount(vv.(string)) + if true { + } else { + } +Never: + for i := 0; i < 10; { + break Never + } + _, ok := vv[0].(A) + if !ok { + switch x := vv[0].(type) { + } + } +}