golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/token/range.txt (about)

     1  This test checks the output of textDocument/semanticTokens/range.
     2  
     3  TODO: add more assertions.
     4  
     5  -- settings.json --
     6  {
     7  	"semanticTokens": true
     8  }
     9  
    10  -- a.go --
    11  package p //@token("package", "keyword", "")
    12  
    13  const C = 42 //@token("C", "variable", "definition readonly")
    14  
    15  func F() { //@token("F", "function", "definition")
    16  	x := 2 + 3//@token("x", "variable", "definition"),token("2", "number", ""),token("+", "operator", "")
    17  	_ = x //@token("x", "variable", "")
    18  	_ = F //@token("F", "function", "")
    19  }