summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Buchanan <justinbuchanan@google.com>2022-06-30 11:45:59 -0700
committerGitHub <noreply@github.com>2022-06-30 11:45:59 -0700
commit4aff6ac52c27de4d306b73982b343d6dcae4c2a7 (patch)
tree56bba21a11eea80367b8e4cd10defcffc57cdfa1
parent98874ffae231c5eca8d490dc160967a233ea6df3 (diff)
downloadkythe-4aff6ac52c27de4d306b73982b343d6dcae4c2a7.tar.gz
chore(go): adjust verifier goal regex to be compatible with latest gofmt (#5318)
Our verifier assertions previously had a prefix of "//-", which the latest gofmt changes to "// -" in some cases. This change applies gofmt to all go indexer testdata files and adjusts the --goal_regex to accept both prefix styles.
-rw-r--r--kythe/go/indexer/testdata/basic/anchors.go6
-rw-r--r--kythe/go/indexer/testdata/basic/anonref.go4
-rw-r--r--kythe/go/indexer/testdata/basic/anonymous.go26
-rw-r--r--kythe/go/indexer/testdata/basic/filenode.go4
-rw-r--r--kythe/go/indexer/testdata/basic/funcall.go14
-rw-r--r--kythe/go/indexer/testdata/basic/functions.go80
-rw-r--r--kythe/go/indexer/testdata/basic/imports.go4
-rw-r--r--kythe/go/indexer/testdata/basic/locals.go2
-rw-r--r--kythe/go/indexer/testdata/basic/packageinit.go18
-rw-r--r--kythe/go/indexer/testdata/basic/packages.go2
-rw-r--r--kythe/go/indexer/testdata/basic/satisfies.go14
-rw-r--r--kythe/go/indexer/testdata/basic/scopes.go4
-rw-r--r--kythe/go/indexer/testdata/basic/stdliboverride.go2
-rw-r--r--kythe/go/indexer/testdata/basic/structref.go26
-rw-r--r--kythe/go/indexer/testdata/basic/tappcorpus.go6
-rw-r--r--kythe/go/indexer/testdata/basic/typespec.go50
-rw-r--r--kythe/go/indexer/testdata/basic/vardef.go16
-rw-r--r--kythe/go/indexer/testdata/code/funcdecl.go154
-rw-r--r--kythe/go/indexer/testdata/code/interface.go22
-rw-r--r--kythe/go/indexer/testdata/code/methdecl.go384
-rw-r--r--kythe/go/indexer/testdata/code/pkgvar.go46
-rw-r--r--kythe/go/indexer/testdata/code/structtype.go22
-rw-r--r--kythe/go/indexer/testdata/generics/genericdep.go10
-rw-r--r--kythe/go/indexer/testdata/generics/genericfunc.go16
-rw-r--r--kythe/go/indexer/testdata/generics/genericinterface.go28
-rw-r--r--kythe/go/indexer/testdata/generics/genericmethod.go34
-rw-r--r--kythe/go/indexer/testdata/generics/genericstruct.go18
-rw-r--r--kythe/go/indexer/testdata/go_indexer_test.bzl2
-rw-r--r--kythe/go/indexer/testdata/initcall.go2
-rw-r--r--kythe/go/indexer/testdata/integration/marked_source.go8
-rw-r--r--kythe/go/indexer/testdata/override.go86
-rw-r--r--kythe/go/indexer/testdata/structinit.go6
-rw-r--r--kythe/go/indexer/testdata/types.go164
-rw-r--r--kythe/go/indexer/testdata/unsafe.go8
34 files changed, 644 insertions, 644 deletions
diff --git a/kythe/go/indexer/testdata/basic/anchors.go b/kythe/go/indexer/testdata/basic/anchors.go
index b7206eb21..006ce7e09 100644
--- a/kythe/go/indexer/testdata/basic/anchors.go
+++ b/kythe/go/indexer/testdata/basic/anchors.go
@@ -1,8 +1,8 @@
// Package anchors verifies that anchors have their language set.
//
-//- @"anchors"=vname(_,_,_,_,"go") defines/binding Pkg
-//- Pkg.node/kind package
+// - @"anchors"=vname(_,_,_,_,"go") defines/binding Pkg
+// - Pkg.node/kind package
package anchors
-//- @x=vname(_,_,_,_,"go") defines/binding _X
+// - @x=vname(_,_,_,_,"go") defines/binding _X
var x int
diff --git a/kythe/go/indexer/testdata/basic/anonref.go b/kythe/go/indexer/testdata/basic/anonref.go
index 2321fb248..4f135e2ca 100644
--- a/kythe/go/indexer/testdata/basic/anonref.go
+++ b/kythe/go/indexer/testdata/basic/anonref.go
@@ -4,6 +4,6 @@ import (
anonymous "kythe/go/indexer/anonymous_test"
)
-//- @Struct ref Struct
-//- @V ref V
+// - @Struct ref Struct
+// - @V ref V
var _ = anonymous.Struct.V
diff --git a/kythe/go/indexer/testdata/basic/anonymous.go b/kythe/go/indexer/testdata/basic/anonymous.go
index 9afae6470..449dc619a 100644
--- a/kythe/go/indexer/testdata/basic/anonymous.go
+++ b/kythe/go/indexer/testdata/basic/anonymous.go
@@ -5,8 +5,8 @@
// initializers, those fields may have references that we'd like to capture.
package anon
-//- @planx defines/binding Planx
-//- Planx.node/kind variable
+// - @planx defines/binding Planx
+// - Planx.node/kind variable
func f(planx struct {
//- T.node/kind variable
//- T.subkind field
@@ -27,8 +27,8 @@ func f(planx struct {
return planx.T
}
-//- @Struct defines/binding Struct
-//- Struct.node/kind variable
+// - @Struct defines/binding Struct
+// - Struct.node/kind variable
var Struct = struct {
//- @V defines/binding V
//- V.node/kind variable
@@ -39,7 +39,7 @@ var Struct = struct {
V: 25,
}
-//- @V ref V
+// - @V ref V
var _ = Struct.V
var w struct {
@@ -49,7 +49,7 @@ var w struct {
X uint32
}
-//- @X ref X
+// - @X ref X
var _ = w.X
var y struct {
@@ -68,11 +68,11 @@ var y struct {
Y: 25,
}
-//- @Y ref Y
+// - @Y ref Y
var _ = y.Y
-//- @elt defines/binding Elt
-//- Elt.node/kind variable
+// - @elt defines/binding Elt
+// - Elt.node/kind variable
var g = func(elt struct {
//- @P defines/binding P
//- P.node/kind variable
@@ -84,8 +84,8 @@ var g = func(elt struct {
return len(elt.P)
}
-//- @em defines/binding Em
-//- Em.node/kind record
+// - @em defines/binding Em
+// - Em.node/kind record
type em struct {
v struct {
//- @X defines/binding EmX
@@ -95,8 +95,8 @@ type em struct {
}
}
-//- @api defines/binding API
-//- API.node/kind variable
+// - @api defines/binding API
+// - API.node/kind variable
func h(api interface {
//- @M defines/binding M
//- M.node/kind function
diff --git a/kythe/go/indexer/testdata/basic/filenode.go b/kythe/go/indexer/testdata/basic/filenode.go
index 3876d3054..3420e695f 100644
--- a/kythe/go/indexer/testdata/basic/filenode.go
+++ b/kythe/go/indexer/testdata/basic/filenode.go
@@ -1,8 +1,8 @@
// Package file verifies that a file node is generated by the indexer, and that
// it has the correct relationship to its package.
//
-//- File=vname("", "test", "", "basic/filenode.go", "").node/kind file
-//- @file defines/binding Pkg
+// - File=vname("", "test", "", "basic/filenode.go", "").node/kind file
+// - @file defines/binding Pkg
package file
//- Pkg=vname("package", "test", "", "basic", "go").node/kind package
diff --git a/kythe/go/indexer/testdata/basic/funcall.go b/kythe/go/indexer/testdata/basic/funcall.go
index aba82c141..3966123d5 100644
--- a/kythe/go/indexer/testdata/basic/funcall.go
+++ b/kythe/go/indexer/testdata/basic/funcall.go
@@ -1,5 +1,5 @@
// Package fun tests basic function call references.
-//- @fun defines/binding Pkg
+// - @fun defines/binding Pkg
package fun
//- @"\"os/exec\"" ref/imports OSExec
@@ -9,20 +9,20 @@ import "os/exec"
//- Init childof Pkg
//- Init.node/kind function
-//- @F defines/binding Fun = vname("func F", "test", _, "fun", "go")
+// - @F defines/binding Fun = vname("func F", "test", _, "fun", "go")
func F() int { return 0 }
type T struct{}
-//- @M defines/binding Meth=vname("method T.M", "test", _, "fun", "go")
+// - @M defines/binding Meth=vname("method T.M", "test", _, "fun", "go")
func (p *T) M() {}
-//- @F ref Fun
-//- TCall=@"F()" ref/call Fun
-//- TCall childof Init
+// - @F ref Fun
+// - TCall=@"F()" ref/call Fun
+// - TCall childof Init
var _ = F()
-//- @init defines/binding InitFunc = vname("func init#1", "test", _, "fun", "go")
+// - @init defines/binding InitFunc = vname("func init#1", "test", _, "fun", "go")
func init() {
//- @F ref Fun
//- FCall=@"F()" ref/call Fun
diff --git a/kythe/go/indexer/testdata/basic/functions.go b/kythe/go/indexer/testdata/basic/functions.go
index b635b8491..26d5a4a0a 100644
--- a/kythe/go/indexer/testdata/basic/functions.go
+++ b/kythe/go/indexer/testdata/basic/functions.go
@@ -7,52 +7,52 @@ package functions
// Anonymous functions do not get binding anchors.
//
-//- @"func(b bool) {}" defines
-//- Anon1 = vname("package.<init>@59$1", "test", _, "fun", "go")
-//- Anon1 param.0 _AnonPB
-//- Anon1.node/kind function
+// - @"func(b bool) {}" defines
+// - Anon1 = vname("package.<init>@59$1", "test", _, "fun", "go")
+// - Anon1 param.0 _AnonPB
+// - Anon1.node/kind function
var _ = func(b bool) {}
-//- @"func(z int) {}" defines
-//- Anon2 = vname("package.<init>@59$2", "test", _, "fun", "go")
-//- Anon2 param.0 _AnonPZ
-//- Anon2.node/kind function
+// - @"func(z int) {}" defines
+// - Anon2 = vname("package.<init>@59$2", "test", _, "fun", "go")
+// - Anon2 param.0 _AnonPZ
+// - Anon2.node/kind function
var _ = func(z int) {}
-//- @"func F(input int) (output int) { return 17 }" defines Fun
-//- @F defines/binding Fun
-//-
-//- @input defines/binding FunInput
-//- Fun param.0 FunInput
-//- FunInput childof Fun
-//-
-//- @output defines/binding FunOutput
-//- FunOutput childof Fun
+// - @"func F(input int) (output int) { return 17 }" defines Fun
+// - @F defines/binding Fun
+// -
+// - @input defines/binding FunInput
+// - Fun param.0 FunInput
+// - FunInput childof Fun
+// -
+// - @output defines/binding FunOutput
+// - FunOutput childof Fun
func F(input int) (output int) { return 17 }
type T struct{}
-//- @"func (recv *T) M(input int) (output int) { return 34 }" defines Meth
-//- @M defines/binding Meth
-//-
-//- @recv defines/binding Recv
-//- Recv.node/kind variable
-//- Meth param.0 Recv
-//- Recv childof Meth
-//-
-//- @input defines/binding MethInput
-//- MethInput.node/kind variable
-//- Meth param.1 MethInput
-//- MethInput childof Meth
-//-
-//- @output defines/binding MethOutput
-//- MethOutput.node/kind variable
-//- MethOutput childof Meth
-//- Meth childof _Struct
+// - @"func (recv *T) M(input int) (output int) { return 34 }" defines Meth
+// - @M defines/binding Meth
+// -
+// - @recv defines/binding Recv
+// - Recv.node/kind variable
+// - Meth param.0 Recv
+// - Recv childof Meth
+// -
+// - @input defines/binding MethInput
+// - MethInput.node/kind variable
+// - Meth param.1 MethInput
+// - MethInput childof Meth
+// -
+// - @output defines/binding MethOutput
+// - MethOutput.node/kind variable
+// - MethOutput childof Meth
+// - Meth childof _Struct
func (recv *T) M(input int) (output int) { return 34 }
-//- @outer defines/binding Outer
-//- Outer.node/kind function
+// - @outer defines/binding Outer
+// - Outer.node/kind function
func outer() {
//- @"func(q bool) {}" defines Inner = vname("func outer$1", _, _, _, _)
//- Inner param.0 _InnerPQ
@@ -60,8 +60,8 @@ func outer() {
_ = func(q bool) {}
}
-//- @ignore defines/binding Ignore
-//- Ignore param.0 Unnamed
-//- Unnamed.node/kind variable
-//- !{_X defines/binding Unnamed}
+// - @ignore defines/binding Ignore
+// - Ignore param.0 Unnamed
+// - Unnamed.node/kind variable
+// - !{_X defines/binding Unnamed}
func ignore(_ int) bool { return false }
diff --git a/kythe/go/indexer/testdata/basic/imports.go b/kythe/go/indexer/testdata/basic/imports.go
index 443ec8979..c14afa222 100644
--- a/kythe/go/indexer/testdata/basic/imports.go
+++ b/kythe/go/indexer/testdata/basic/imports.go
@@ -11,8 +11,8 @@ import (
"strconv"
)
-//- @fmt ref Fmt
+// - @fmt ref Fmt
var _ = fmt.Sprint
-//- @strconv ref Strconv
+// - @strconv ref Strconv
var _ = strconv.Atoi
diff --git a/kythe/go/indexer/testdata/basic/locals.go b/kythe/go/indexer/testdata/basic/locals.go
index 05777e77c..5b4c85a6c 100644
--- a/kythe/go/indexer/testdata/basic/locals.go
+++ b/kythe/go/indexer/testdata/basic/locals.go
@@ -1,7 +1,7 @@
// Package locals tests bindings in local scopes.
package locals
-//- @foo defines/binding Foo
+// - @foo defines/binding Foo
func foo() {
//- @alpha defines/binding Alpha1
//- Alpha1.node/kind variable
diff --git a/kythe/go/indexer/testdata/basic/packageinit.go b/kythe/go/indexer/testdata/basic/packageinit.go
index 796df7d03..a19413e7a 100644
--- a/kythe/go/indexer/testdata/basic/packageinit.go
+++ b/kythe/go/indexer/testdata/basic/packageinit.go
@@ -8,13 +8,13 @@ import "fmt"
// package initializer, and that said initializer is given a sensible
// definition anchor per http://www.kythe.io/docs/schema/callgraph.html
-//- A=@"fmt.Sprint(27)" ref/call _FmtSprint
-//- A childof PkgInit=vname("package.<init>@107", "test", _, "pkginit", "go")
-//- PkgInit.node/kind function
-//-
-//- InitDef=vname(_, "test", "", "pkginit/packageinit.go", "go")
-//- defines PkgInit
-//- InitDef.node/kind anchor
-//- InitDef.loc/start 0
-//- InitDef.loc/end 0
+// - A=@"fmt.Sprint(27)" ref/call _FmtSprint
+// - A childof PkgInit=vname("package.<init>@107", "test", _, "pkginit", "go")
+// - PkgInit.node/kind function
+// -
+// - InitDef=vname(_, "test", "", "pkginit/packageinit.go", "go")
+// - defines PkgInit
+// - InitDef.node/kind anchor
+// - InitDef.loc/start 0
+// - InitDef.loc/end 0
var p = fmt.Sprint(27)
diff --git a/kythe/go/indexer/testdata/basic/packages.go b/kythe/go/indexer/testdata/basic/packages.go
index eb9c28f85..bf767f441 100644
--- a/kythe/go/indexer/testdata/basic/packages.go
+++ b/kythe/go/indexer/testdata/basic/packages.go
@@ -1,5 +1,5 @@
// Package pkg verifies that the required package structure is created.
-//- @pkg defines/binding Pkg
+// - @pkg defines/binding Pkg
package pkg
//- Pkg=vname("package", "test", _, "pkg", "go").node/kind package
diff --git a/kythe/go/indexer/testdata/basic/satisfies.go b/kythe/go/indexer/testdata/basic/satisfies.go
index 4901bae12..00c8b1f81 100644
--- a/kythe/go/indexer/testdata/basic/satisfies.go
+++ b/kythe/go/indexer/testdata/basic/satisfies.go
@@ -1,7 +1,7 @@
// Package impl tests implementation relationships.
package impl
-//- @Busy defines/binding BusyInterface
+// - @Busy defines/binding BusyInterface
type Busy interface {
//- @Do defines/binding DoMethod
//- DoMethod childof BusyInterface
@@ -12,17 +12,17 @@ type Busy interface {
Be()
}
-//- @Phil defines/binding Phil
-//- Phil satisfies Busy
+// - @Phil defines/binding Phil
+// - Phil satisfies Busy
type Phil int
func (Phil) Do() {}
func (Phil) Be() {}
-//- @Bad1 defines/binding DoOnly
-//- !{ DoOnly satisfies Busy}
+// - @Bad1 defines/binding DoOnly
+// - !{ DoOnly satisfies Busy}
type Bad1 bool
-//- @Bad2 defines/binding BeOnly
-//- !{ BeOnly satisfies Busy}
+// - @Bad2 defines/binding BeOnly
+// - !{ BeOnly satisfies Busy}
type Bad2 float64
diff --git a/kythe/go/indexer/testdata/basic/scopes.go b/kythe/go/indexer/testdata/basic/scopes.go
index 7d8516207..0c8607720 100644
--- a/kythe/go/indexer/testdata/basic/scopes.go
+++ b/kythe/go/indexer/testdata/basic/scopes.go
@@ -1,9 +1,9 @@
package scopes
-//- @Ident defines/binding Ident
+// - @Ident defines/binding Ident
var Ident bool
-//- @F defines/binding F
+// - @F defines/binding F
func F() {
//- IdentRef=@Ident ref Ident
//- IdentRef childof F
diff --git a/kythe/go/indexer/testdata/basic/stdliboverride.go b/kythe/go/indexer/testdata/basic/stdliboverride.go
index eba3d4daa..e2ab57d32 100644
--- a/kythe/go/indexer/testdata/basic/stdliboverride.go
+++ b/kythe/go/indexer/testdata/basic/stdliboverride.go
@@ -8,7 +8,7 @@ import (
"bytes"
)
-//- @myFunc=vname(_,"kythe",_,_,"go") defines/binding _MY_FUNC
+// - @myFunc=vname(_,"kythe",_,_,"go") defines/binding _MY_FUNC
func myFunc() {
//- @bytes ref BYTES
//- @NewBuffer ref vname(_,"STDLIB_OVERRIDE",_,_,"go")
diff --git a/kythe/go/indexer/testdata/basic/structref.go b/kythe/go/indexer/testdata/basic/structref.go
index ae0c635d4..afdf0c6a3 100644
--- a/kythe/go/indexer/testdata/basic/structref.go
+++ b/kythe/go/indexer/testdata/basic/structref.go
@@ -11,25 +11,25 @@ import (
// Construct a struct value from another package.
//
-//- @cmd defines/binding Cmd
-//- Cmd.node/kind variable
-//- @exec ref Exec
-//- @"exec.Command(\"blah\")" ref/call ExecCommand
-//- @Command ref ExecCommand
+// - @cmd defines/binding Cmd
+// - Cmd.node/kind variable
+// - @exec ref Exec
+// - @"exec.Command(\"blah\")" ref/call ExecCommand
+// - @Command ref ExecCommand
var cmd = exec.Command("blah")
// Verify that references to the struct's fields work.
//
-//- @ofp defines/binding Out
-//- Out.node/kind variable
-//- @cmd ref Cmd
-//- StdoutRef=@Stdout ref CmdStdout
-//- = vname("field Cmd.Stdout","golang.org","","os/exec","go")
-//- ! {StdoutRef childof _}
+// - @ofp defines/binding Out
+// - Out.node/kind variable
+// - @cmd ref Cmd
+// - StdoutRef=@Stdout ref CmdStdout
+// - = vname("field Cmd.Stdout","golang.org","","os/exec","go")
+// - ! {StdoutRef childof _}
var ofp = cmd.Stdout
-//- @init defines/binding Init
-//- Init.node/kind function
+// - @init defines/binding Init
+// - Init.node/kind function
func init() {
//- @cmd ref Cmd
//- @Stdout ref CmdStdout
diff --git a/kythe/go/indexer/testdata/basic/tappcorpus.go b/kythe/go/indexer/testdata/basic/tappcorpus.go
index b9e5cd4eb..457551603 100644
--- a/kythe/go/indexer/testdata/basic/tappcorpus.go
+++ b/kythe/go/indexer/testdata/basic/tappcorpus.go
@@ -3,7 +3,7 @@ package tappcorpus
// When --use_compilation_corpus_as_default is enabled in the go indexer, tapp
// nodes should use the compilation unit's corpus rather than the empty corpus.
-//- @x defines/binding VarX=vname(_,"kythe",_,_,"go")
-//- VarX typed IntSlice=vname(_,"kythe",_,_,"go")
-//- IntSlice.node/kind tapp
+// - @x defines/binding VarX=vname(_,"kythe",_,_,"go")
+// - VarX typed IntSlice=vname(_,"kythe",_,_,"go")
+// - IntSlice.node/kind tapp
var x []int
diff --git a/kythe/go/indexer/testdata/basic/typespec.go b/kythe/go/indexer/testdata/basic/typespec.go
index ecd4f5f5e..c233be8b7 100644
--- a/kythe/go/indexer/testdata/basic/typespec.go
+++ b/kythe/go/indexer/testdata/basic/typespec.go
@@ -3,33 +3,33 @@ package tspec
import "fmt"
-//- @Int defines/binding Int
-//- @"Int int" defines Int
-//- Int.node/kind record
-//- Int.subkind type
+// - @Int defines/binding Int
+// - @"Int int" defines Int
+// - Int.node/kind record
+// - Int.subkind type
type Int int
-//- @Ptr defines/binding Ptr
-//- @"Ptr *bool" defines Ptr
-//- Ptr.node/kind record
-//- Ptr.subkind type
+// - @Ptr defines/binding Ptr
+// - @"Ptr *bool" defines Ptr
+// - Ptr.node/kind record
+// - Ptr.subkind type
type Ptr *bool
type under struct{ z int }
-//- @Over defines/binding Over
-//- Over.node/kind record
-//- Over.subkind struct
+// - @Over defines/binding Over
+// - Over.node/kind record
+// - Over.subkind struct
type Over under
-//- @UPtr defines/binding UPtr
-//- UPtr.node/kind record
-//- UPtr.subkind type
+// - @UPtr defines/binding UPtr
+// - UPtr.node/kind record
+// - UPtr.subkind type
type UPtr *under
-//- @Struct defines/binding Struct
-//- Struct.node/kind record
-//- Struct.subkind struct
+// - @Struct defines/binding Struct
+// - Struct.node/kind record
+// - Struct.subkind struct
type Struct struct {
//- @Alpha defines/binding Alpha
//- Alpha.node/kind variable
@@ -44,9 +44,9 @@ type Struct struct {
Bravo int
}
-//- @Embed defines/binding Embed
-//- Embed.node/kind record
-//- Embed.subkind struct
+// - @Embed defines/binding Embed
+// - Embed.node/kind record
+// - Embed.subkind struct
type Embed struct {
// An embedded type from this package.
//
@@ -78,8 +78,8 @@ type Embed struct {
Velocipede struct{}
}
-//- @Thinger defines/binding Thinger
-//- Thinger.node/kind interface
+// - @Thinger defines/binding Thinger
+// - Thinger.node/kind interface
type Thinger interface {
//- @Thing defines/binding Thing
//- Thing.node/kind function
@@ -87,9 +87,9 @@ type Thinger interface {
Thing()
}
-//- @Extender defines/binding Extender
-//- Extender.node/kind interface
-//- Extender extends Thinger
+// - @Extender defines/binding Extender
+// - Extender.node/kind interface
+// - Extender extends Thinger
type Extender interface {
Thinger
diff --git a/kythe/go/indexer/testdata/basic/vardef.go b/kythe/go/indexer/testdata/basic/vardef.go
index a93f4d1ee..87f78be07 100644
--- a/kythe/go/indexer/testdata/basic/vardef.go
+++ b/kythe/go/indexer/testdata/basic/vardef.go
@@ -1,15 +1,15 @@
// Package def tests variable and constant definitions.
-//- @def defines/binding Pkg
+// - @def defines/binding Pkg
package def
//- Pkg.node/kind package
-//- @topLevel defines/binding TopLevel
-//- TopLevel.node/kind variable
-//- TopLevel childof Pkg
+// - @topLevel defines/binding TopLevel
+// - TopLevel.node/kind variable
+// - TopLevel childof Pkg
var topLevel int
-//- @outer defines/binding Outer
+// - @outer defines/binding Outer
func outer() {
//- @stabby defines/binding V
//- V.node/kind variable
@@ -19,7 +19,7 @@ func outer() {
_ = stabby // suppress unused variable error
}
-//- @magic defines/binding Const
-//- Const.node/kind constant
-//- Const childof Pkg
+// - @magic defines/binding Const
+// - Const.node/kind constant
+// - Const childof Pkg
const magic = "beans"
diff --git a/kythe/go/indexer/testdata/code/funcdecl.go b/kythe/go/indexer/testdata/code/funcdecl.go
index ef2f3ad4a..d32a918da 100644
--- a/kythe/go/indexer/testdata/code/funcdecl.go
+++ b/kythe/go/indexer/testdata/code/funcdecl.go
@@ -1,64 +1,64 @@
// Package funcdecl tests code facts for a function declaration.
-//- @funcdecl defines/binding Pkg
+// - @funcdecl defines/binding Pkg
package funcdecl
-//- @Positive defines/binding Pos
-//- Pos code PosCode
-//-
-//- @x defines/binding Param // see Note [1].
-//- Param code XCode
-//- XCode.post_child_text " "
-//- XCode child.0 XName
-//- XCode child.1 XTypeLookup
-//- XTypeLookup.kind "LOOKUP_BY_TYPED"
-//- Param typed ParamType
-//- ParamType code XType
-//-
-//- XName child.0 XCtx
-//- XName child.1 XId
-//-
-//- XCtx child.0 XPkg
-//- XCtx child.1 XFunc
-//- XPkg.kind "IDENTIFIER"
-//- XPkg.pre_text "funcdecl"
-//- XPkg link Pkg
-//- XFunc.kind "IDENTIFIER"
-//- XFunc.pre_text "Positive"
-//- XId.kind "IDENTIFIER"
-//- XId.pre_text "x"
-//-
-//- XType.kind "TYPE"
-//- XType.pre_text "int"
-//-
-//- //--------------------------------------------------
-//- PosCode child.0 PCFunc // func
-//- PosCode child.1 PCName // test/funcdecl.Positive
-//- PosCode child.2 PCParams // parameters
-//- PosCode child.3 PCResult // result
-//-
-//- //--------------------------------------------------
-//- PCFunc.pre_text "func "
-//-
-//- PCName child.0 PCContext
-//- PCName child.1 PCIdent
-//-
-//- PCParams.kind "PARAMETER_LOOKUP_BY_PARAM"
-//- PCParams.pre_text "("
-//- PCParams.post_text ")"
-//- PCParams.post_child_text ", "
-//-
-//- PCResult.pre_text " "
-//- PCResult child.0 PCReturn
-//- PCReturn.pre_text "bool"
-//-
-//- //--------------------------------------------------
-//- PCContext.kind "CONTEXT"
-//- PCContext child.0 PCPkg
-//- PCPkg.pre_text "funcdecl"
-//- PCPkg link Pkg
-//- PCIdent.kind "IDENTIFIER"
-//- PCIdent.pre_text "Positive"
-//- PCIdent link Pos
+// - @Positive defines/binding Pos
+// - Pos code PosCode
+// -
+// - @x defines/binding Param // see Note [1].
+// - Param code XCode
+// - XCode.post_child_text " "
+// - XCode child.0 XName
+// - XCode child.1 XTypeLookup
+// - XTypeLookup.kind "LOOKUP_BY_TYPED"
+// - Param typed ParamType
+// - ParamType code XType
+// -
+// - XName child.0 XCtx
+// - XName child.1 XId
+// -
+// - XCtx child.0 XPkg
+// - XCtx child.1 XFunc
+// - XPkg.kind "IDENTIFIER"
+// - XPkg.pre_text "funcdecl"
+// - XPkg link Pkg
+// - XFunc.kind "IDENTIFIER"
+// - XFunc.pre_text "Positive"
+// - XId.kind "IDENTIFIER"
+// - XId.pre_text "x"
+// -
+// - XType.kind "TYPE"
+// - XType.pre_text "int"
+// -
+// - //--------------------------------------------------
+// - PosCode child.0 PCFunc // func
+// - PosCode child.1 PCName // test/funcdecl.Positive
+// - PosCode child.2 PCParams // parameters
+// - PosCode child.3 PCResult // result
+// -
+// - //--------------------------------------------------
+// - PCFunc.pre_text "func "
+// -
+// - PCName child.0 PCContext
+// - PCName child.1 PCIdent
+// -
+// - PCParams.kind "PARAMETER_LOOKUP_BY_PARAM"
+// - PCParams.pre_text "("
+// - PCParams.post_text ")"
+// - PCParams.post_child_text ", "
+// -
+// - PCResult.pre_text " "
+// - PCResult child.0 PCReturn
+// - PCReturn.pre_text "bool"
+// -
+// - //--------------------------------------------------
+// - PCContext.kind "CONTEXT"
+// - PCContext child.0 PCPkg
+// - PCPkg.pre_text "funcdecl"
+// - PCPkg link Pkg
+// - PCIdent.kind "IDENTIFIER"
+// - PCIdent.pre_text "Positive"
+// - PCIdent link Pos
func Positive(x int) bool {
return x > 0
}
@@ -67,23 +67,23 @@ func Positive(x int) bool {
// the function will be looked up by the server (or denormalized in post). This
// checks that the explicit signature is generated correctly in situ.
-//- @True defines/binding True
-//- True code TrueCode
-//-
-//- TrueCode child.0 TCFunc
-//- TrueCode child.1 TCName
-//- TrueCode child.2 TCParams
-//- TrueCode child.3 TCResult
-//-
-//- TCFunc.pre_text "func "
-//-
-//- TCName child.0 _TCContext
-//- TCName child.1 _TCIdent
-//-
-//- TCParams.kind "PARAMETER"
-//- TCParams.pre_text "()"
-//-
-//- TCResult.pre_text " "
-//- TCResult child.0 TCReturn
-//- TCReturn.pre_text "bool"
+// - @True defines/binding True
+// - True code TrueCode
+// -
+// - TrueCode child.0 TCFunc
+// - TrueCode child.1 TCName
+// - TrueCode child.2 TCParams
+// - TrueCode child.3 TCResult
+// -
+// - TCFunc.pre_text "func "
+// -
+// - TCName child.0 _TCContext
+// - TCName child.1 _TCIdent
+// -
+// - TCParams.kind "PARAMETER"
+// - TCParams.pre_text "()"
+// -
+// - TCResult.pre_text " "
+// - TCResult child.0 TCReturn
+// - TCReturn.pre_text "bool"
func True() bool { return true }
diff --git a/kythe/go/indexer/testdata/code/interface.go b/kythe/go/indexer/testdata/code/interface.go
index ef135ed2e..c2a9e2d54 100644
--- a/kythe/go/indexer/testdata/code/interface.go
+++ b/kythe/go/indexer/testdata/code/interface.go
@@ -1,17 +1,17 @@
// Package iface tests code facts for an interface type.
-//- @iface defines/binding Pkg
+// - @iface defines/binding Pkg
package iface
-//- @Thinger defines/binding Thinger
-//- Thinger code TName
-//-
-//- TName child.0 TContext
-//- TContext.kind "CONTEXT"
-//-
-//- TName child.1 TIdent
-//- TIdent.kind "IDENTIFIER"
-//- TIdent.pre_text "Thinger"
-//- TIdent link Thinger
+// - @Thinger defines/binding Thinger
+// - Thinger code TName
+// -
+// - TName child.0 TContext
+// - TContext.kind "CONTEXT"
+// -
+// - TName child.1 TIdent
+// - TIdent.kind "IDENTIFIER"
+// - TIdent.pre_text "Thinger"
+// - TIdent link Thinger
type Thinger interface {
//- @Thing defines/binding Thing
//- Thing code MCode
diff --git a/kythe/go/indexer/testdata/code/methdecl.go b/kythe/go/indexer/testdata/code/methdecl.go
index b73860023..e04c50970 100644
--- a/kythe/go/indexer/testdata/code/methdecl.go
+++ b/kythe/go/indexer/testdata/code/methdecl.go
@@ -3,65 +3,65 @@ package methdecl
type w struct{}
-//- @LessThan defines/binding LT
-//- LT code LTCode
-//-
-//- LTCode child.0 LTFunc
-//- LTCode child.1 LTRecv
-//- LTCode child.2 LTName
-//- LTCode child.3 LTParams
-//- LTCode child.4 LTResult
-//-
-//- LTFunc.pre_text "func "
-//-
-//- LTRecv.kind "PARAMETER"
-//- LTRecv.pre_text "("
-//- LTRecv.post_text ") "
-//- LTRecv child.0 LTRType
-//-
-//- LTName child.0 LTContext
-//- LTName child.1 LTIdent
-//-
-//- LTParams.kind "PARAMETER_LOOKUP_BY_PARAM"
-//- LTParams.lookup_index 1
-//- LTParams.pre_text "("
-//- LTParams.post_text ")"
-//- LTParams.post_child_text ", "
-//-
-//- LTResult.pre_text " "
-//- LTResult.kind "TYPE"
-//- LTResult child.0 LTReturn
-//- LTReturn.pre_text "bool"
-//-
-//- LTRType.kind "TYPE"
-//- LTRType.pre_text "*w"
-//-
-//- LTContext.kind "CONTEXT"
-//- LTContext.post_child_text "."
-//- LTContext child.0 LTPkg
-//- LTContext child.1 LTCType
-//- LTPkg.pre_text "methdecl"
-//- LTCType.pre_text "w"
-//- LTIdent.pre_text "LessThan"
-//-
-//- @x defines/binding LTX
-//- LTX code XCode
-//- XCode child.0 XName
-//- XName child.0 XCtx
-//- XCtx.kind "CONTEXT"
-//- XCtx child.0 XPkg
-//- XCtx child.1 XRec
-//- XCtx child.2 XFun
-//- XName child.1 XId
-//- XPkg.kind "IDENTIFIER"
-//- XPkg.pre_text "methdecl"
-//- XRec.kind "IDENTIFIER"
-//- XRec.pre_text "w"
-//- XFun.kind "IDENTIFIER"
-//- XFun.pre_text "LessThan"
-//- XId.kind "IDENTIFIER"
-//- XId.pre_text "x"
-//-
+// - @LessThan defines/binding LT
+// - LT code LTCode
+// -
+// - LTCode child.0 LTFunc
+// - LTCode child.1 LTRecv
+// - LTCode child.2 LTName
+// - LTCode child.3 LTParams
+// - LTCode child.4 LTResult
+// -
+// - LTFunc.pre_text "func "
+// -
+// - LTRecv.kind "PARAMETER"
+// - LTRecv.pre_text "("
+// - LTRecv.post_text ") "
+// - LTRecv child.0 LTRType
+// -
+// - LTName child.0 LTContext
+// - LTName child.1 LTIdent
+// -
+// - LTParams.kind "PARAMETER_LOOKUP_BY_PARAM"
+// - LTParams.lookup_index 1
+// - LTParams.pre_text "("
+// - LTParams.post_text ")"
+// - LTParams.post_child_text ", "
+// -
+// - LTResult.pre_text " "
+// - LTResult.kind "TYPE"
+// - LTResult child.0 LTReturn
+// - LTReturn.pre_text "bool"
+// -
+// - LTRType.kind "TYPE"
+// - LTRType.pre_text "*w"
+// -
+// - LTContext.kind "CONTEXT"
+// - LTContext.post_child_text "."
+// - LTContext child.0 LTPkg
+// - LTContext child.1 LTCType
+// - LTPkg.pre_text "methdecl"
+// - LTCType.pre_text "w"
+// - LTIdent.pre_text "LessThan"
+// -
+// - @x defines/binding LTX
+// - LTX code XCode
+// - XCode child.0 XName
+// - XName child.0 XCtx
+// - XCtx.kind "CONTEXT"
+// - XCtx child.0 XPkg
+// - XCtx child.1 XRec
+// - XCtx child.2 XFun
+// - XName child.1 XId
+// - XPkg.kind "IDENTIFIER"
+// - XPkg.pre_text "methdecl"
+// - XRec.kind "IDENTIFIER"
+// - XRec.pre_text "w"
+// - XFun.kind "IDENTIFIER"
+// - XFun.pre_text "LessThan"
+// - XId.kind "IDENTIFIER"
+// - XId.pre_text "x"
+// -
func (rec *w) LessThan(x int) bool {
return x < 0
}
@@ -71,139 +71,139 @@ type Context interface{}
type FlagSet struct{}
type API struct{}
-//- @Run defines/binding RunFunc
-//- RunFunc code RFCode
-//-
-//- RFCode child.0 RFFunc
-//- RFCode child.1 RFRecv
-//- RFCode child.2 RFName
-//- RFCode child.3 RFParams
-//- RFCode child.4 RFResult
-//-
-//- RFFunc.pre_text "func "
-//-
-//- RFRecv.kind "PARAMETER"
-//- RFRecv.pre_text "("
-//- RFRecv.post_text ") "
-//- RFRecv child.0 RFRType
-//-
-//- RFName child.0 RFContext
-//- RFName child.1 RFIdent
-//-
-//- RFParams.kind "PARAMETER_LOOKUP_BY_PARAM"
-//- RFParams.lookup_index 1
-//- RFParams.pre_text "("
-//- RFParams.post_text ")"
-//- RFParams.post_child_text ", "
-//-
-//- RFResult.pre_text " "
-//- RFResult.kind "TYPE"
-//- RFResult child.0 RFReturn
-//- RFReturn.pre_text "error"
-//-
-//- RFRType.kind "TYPE"
-//- RFRType.pre_text "decorCommand"
-//-
-//- RFContext.kind "CONTEXT"
-//- RFContext.post_child_text "."
-//- RFContext child.0 RFPkg
-//- RFContext child.1 RFCType
-//- RFPkg.pre_text "methdecl"
-//- RFCType.pre_text "decorCommand"
-//- RFIdent.pre_text "Run"
-//-
-//- @ctx defines/binding RFCtx
-//- RFCtx code CtxCode
-//- CtxCode child.0 CtxName
-//- CtxCode child.1 CtxType
-//- CtxName child.0 CtxCtx
-//- CtxCtx.kind "CONTEXT"
-//- CtxCtx child.0 CtxPkg
-//- CtxCtx child.1 CtxRec
-//- CtxCtx child.2 CtxFun
-//- CtxName child.1 CtxId
-//- CtxPkg.kind "IDENTIFIER"
-//- CtxPkg.pre_text "methdecl"
-//- CtxRec.kind "IDENTIFIER"
-//- CtxRec.pre_text "decorCommand"
-//- CtxFun.kind "IDENTIFIER"
-//- CtxFun.pre_text "Run"
-//- CtxId.kind "IDENTIFIER"
-//- CtxId.pre_text "ctx"
-//- CtxType.kind "LOOKUP_BY_TYPED"
-//- CtxType.lookup_index 0
-//-
-//- @Context ref CtxTypeValue
-//- CtxTypeValue code CtxTypeValueCode
-//- CtxTypeValueCode child.0 CtxTypeValueCodeCtx
-//- CtxTypeValueCodeCtx.kind "CONTEXT"
-//- CtxTypeValueCodeCtx.post_child_text "."
-//- CtxTypeValueCodeCtx child.0 CtxTypeValueCodeCtxChild
-//- CtxTypeValueCodeCtxChild.kind "IDENTIFIER"
-//- CtxTypeValueCodeCtxChild.pre_text "methdecl"
-//- CtxTypeValueCode child.1 CtxTypeValueCodeID
-//- CtxTypeValueCodeID.kind "IDENTIFIER"
-//- CtxTypeValueCodeID.pre_text "Context"
-//-
-//- @flag defines/binding RFFlag
-//- RFFlag code FlagCode
-//- FlagCode child.0 FlagName
-//- FlagName child.0 FlagCtx
-//- FlagCtx.kind "CONTEXT"
-//- FlagCtx child.0 FlagPkg
-//- FlagCtx child.1 FlagRec
-//- FlagCtx child.2 FlagFun
-//- FlagName child.1 FlagId
-//- FlagPkg.kind "IDENTIFIER"
-//- FlagPkg.pre_text "methdecl"
-//- FlagRec.kind "IDENTIFIER"
-//- FlagRec.pre_text "decorCommand"
-//- FlagFun.kind "IDENTIFIER"
-//- FlagFun.pre_text "Run"
-//- FlagId.kind "IDENTIFIER"
-//- FlagId.pre_text "flag"
-//-
-//- @FlagSet ref FlagTypeValue
-//- FlagTypeValue code FlagTypeValueCode
-//- FlagTypeValueCode child.0 FlagTypeValueCodeCtx
-//- FlagTypeValueCode child.1 FlagTypeValueCodeID
-//- FlagTypeValueCodeCtx.kind "CONTEXT"
-//- FlagTypeValueCodeCtx.post_child_text "."
-//- FlagTypeValueCodeCtx child.0 FlagTypeValueCodeCtxChild
-//- FlagTypeValueCodeCtxChild.kind "IDENTIFIER"
-//- FlagTypeValueCodeCtxChild.pre_text "methdecl"
-//- FlagTypeValueCodeID.kind "IDENTIFIER"
-//- FlagTypeValueCodeID.pre_text "FlagSet"
-//-
-//- @api defines/binding RFApi
-//- RFApi code ApiCode
-//- ApiCode child.0 ApiName
-//- ApiName child.0 ApiCtx
-//- ApiCtx.kind "CONTEXT"
-//- ApiCtx child.0 ApiPkg
-//- ApiCtx child.1 ApiRec
-//- ApiCtx child.2 ApiFun
-//- ApiName child.1 ApiId
-//- ApiPkg.kind "IDENTIFIER"
-//- ApiPkg.pre_text "methdecl"
-//- ApiRec.kind "IDENTIFIER"
-//- ApiRec.pre_text "decorCommand"
-//- ApiFun.kind "IDENTIFIER"
-//- ApiFun.pre_text "Run"
-//- ApiId.kind "IDENTIFIER"
-//- ApiId.pre_text "api"
-//-
-//- @API ref ApiTypeValue
-//- ApiTypeValue code ApiTypeValueCode
-//- ApiTypeValueCode child.0 ApiTypeValueCodeCtx
-//- ApiTypeValueCode child.1 ApiTypeValueCodeID
-//- ApiTypeValueCodeCtx.kind "CONTEXT"
-//- ApiTypeValueCodeCtx.post_child_text "."
-//- ApiTypeValueCodeCtx child.0 ApiTypeValueCodeCtxChild
-//- ApiTypeValueCodeCtxChild.kind "IDENTIFIER"
-//- ApiTypeValueCodeCtxChild.pre_text "methdecl"
-//- ApiTypeValueCodeID.kind "IDENTIFIER"
-//- ApiTypeValueCodeID.pre_text "API"
+// - @Run defines/binding RunFunc
+// - RunFunc code RFCode
+// -
+// - RFCode child.0 RFFunc
+// - RFCode child.1 RFRecv
+// - RFCode child.2 RFName
+// - RFCode child.3 RFParams
+// - RFCode child.4 RFResult
+// -
+// - RFFunc.pre_text "func "
+// -
+// - RFRecv.kind "PARAMETER"
+// - RFRecv.pre_text "("
+// - RFRecv.post_text ") "
+// - RFRecv child.0 RFRType
+// -
+// - RFName child.0 RFContext
+// - RFName child.1 RFIdent
+// -
+// - RFParams.kind "PARAMETER_LOOKUP_BY_PARAM"
+// - RFParams.lookup_index 1
+// - RFParams.pre_text "("
+// - RFParams.post_text ")"
+// - RFParams.post_child_text ", "
+// -
+// - RFResult.pre_text " "
+// - RFResult.kind "TYPE"
+// - RFResult child.0 RFReturn
+// - RFReturn.pre_text "error"
+// -
+// - RFRType.kind "TYPE"
+// - RFRType.pre_text "decorCommand"
+// -
+// - RFContext.kind "CONTEXT"
+// - RFContext.post_child_text "."
+// - RFContext child.0 RFPkg
+// - RFContext child.1 RFCType
+// - RFPkg.pre_text "methdecl"
+// - RFCType.pre_text "decorCommand"
+// - RFIdent.pre_text "Run"
+// -
+// - @ctx defines/binding RFCtx
+// - RFCtx code CtxCode
+// - CtxCode child.0 CtxName
+// - CtxCode child.1 CtxType
+// - CtxName child.0 CtxCtx
+// - CtxCtx.kind "CONTEXT"
+// - CtxCtx child.0 CtxPkg
+// - CtxCtx child.1 CtxRec
+// - CtxCtx child.2 CtxFun
+// - CtxName child.1 CtxId
+// - CtxPkg.kind "IDENTIFIER"
+// - CtxPkg.pre_text "methdecl"
+// - CtxRec.kind "IDENTIFIER"
+// - CtxRec.pre_text "decorCommand"
+// - CtxFun.kind "IDENTIFIER"
+// - CtxFun.pre_text "Run"
+// - CtxId.kind "IDENTIFIER"
+// - CtxId.pre_text "ctx"
+// - CtxType.kind "LOOKUP_BY_TYPED"
+// - CtxType.lookup_index 0
+// -
+// - @Context ref CtxTypeValue
+// - CtxTypeValue code CtxTypeValueCode
+// - CtxTypeValueCode child.0 CtxTypeValueCodeCtx
+// - CtxTypeValueCodeCtx.kind "CONTEXT"
+// - CtxTypeValueCodeCtx.post_child_text "."
+// - CtxTypeValueCodeCtx child.0 CtxTypeValueCodeCtxChild
+// - CtxTypeValueCodeCtxChild.kind "IDENTIFIER"
+// - CtxTypeValueCodeCtxChild.pre_text "methdecl"
+// - CtxTypeValueCode child.1 CtxTypeValueCodeID
+// - CtxTypeValueCodeID.kind "IDENTIFIER"
+// - CtxTypeValueCodeID.pre_text "Context"
+// -
+// - @flag defines/binding RFFlag
+// - RFFlag code FlagCode
+// - FlagCode child.0 FlagName
+// - FlagName child.0 FlagCtx
+// - FlagCtx.kind "CONTEXT"
+// - FlagCtx child.0 FlagPkg
+// - FlagCtx child.1 FlagRec
+// - FlagCtx child.2 FlagFun
+// - FlagName child.1 FlagId
+// - FlagPkg.kind "IDENTIFIER"
+// - FlagPkg.pre_text "methdecl"
+// - FlagRec.kind "IDENTIFIER"
+// - FlagRec.pre_text "decorCommand"
+// - FlagFun.kind "IDENTIFIER"
+// - FlagFun.pre_text "Run"
+// - FlagId.kind "IDENTIFIER"
+// - FlagId.pre_text "flag"
+// -
+// - @FlagSet ref FlagTypeValue
+// - FlagTypeValue code FlagTypeValueCode
+// - FlagTypeValueCode child.0 FlagTypeValueCodeCtx
+// - FlagTypeValueCode child.1 FlagTypeValueCodeID
+// - FlagTypeValueCodeCtx.kind "CONTEXT"
+// - FlagTypeValueCodeCtx.post_child_text "."
+// - FlagTypeValueCodeCtx child.0 FlagTypeValueCodeCtxChild
+// - FlagTypeValueCodeCtxChild.kind "IDENTIFIER"
+// - FlagTypeValueCodeCtxChild.pre_text "methdecl"
+// - FlagTypeValueCodeID.kind "IDENTIFIER"
+// - FlagTypeValueCodeID.pre_text "FlagSet"
+// -
+// - @api defines/binding RFApi
+// - RFApi code ApiCode
+// - ApiCode child.0 ApiName
+// - ApiName child.0 ApiCtx
+// - ApiCtx.kind "CONTEXT"
+// - ApiCtx child.0 ApiPkg
+// - ApiCtx child.1 ApiRec
+// - ApiCtx child.2 ApiFun
+// - ApiName child.1 ApiId
+// - ApiPkg.kind "IDENTIFIER"
+// - ApiPkg.pre_text "methdecl"
+// - ApiRec.kind "IDENTIFIER"
+// - ApiRec.pre_text "decorCommand"
+// - ApiFun.kind "IDENTIFIER"
+// - ApiFun.pre_text "Run"
+// - ApiId.kind "IDENTIFIER"
+// - ApiId.pre_text "api"
+// -
+// - @API ref ApiTypeValue
+// - ApiTypeValue code ApiTypeValueCode
+// - ApiTypeValueCode child.0 ApiTypeValueCodeCtx
+// - ApiTypeValueCode child.1 ApiTypeValueCodeID
+// - ApiTypeValueCodeCtx.kind "CONTEXT"
+// - ApiTypeValueCodeCtx.post_child_text "."
+// - ApiTypeValueCodeCtx child.0 ApiTypeValueCodeCtxChild
+// - ApiTypeValueCodeCtxChild.kind "IDENTIFIER"
+// - ApiTypeValueCodeCtxChild.pre_text "methdecl"
+// - ApiTypeValueCodeID.kind "IDENTIFIER"
+// - ApiTypeValueCodeID.pre_text "API"
func (c decorCommand) Run(ctx Context, flag *FlagSet, api API) error {
return nil
}
diff --git a/kythe/go/indexer/testdata/code/pkgvar.go b/kythe/go/indexer/testdata/code/pkgvar.go
index 0d16888e0..479c44695 100644
--- a/kythe/go/indexer/testdata/code/pkgvar.go
+++ b/kythe/go/indexer/testdata/code/pkgvar.go
@@ -1,27 +1,27 @@
// Package pkgvar tests code facts for package-level variables.
package pkgvar
-//- @V defines/binding Var
-//- Var code VarCode
-//- Var typed VarType
-//- VarType code VType
-//-
-//- VarCode child.0 VName
-//- VarCode child.1 VTyped
-//- VTyped.kind "LOOKUP_BY_TYPED"
-//- VarCode.post_child_text " "
-//-
-//- VName child.0 VContext
-//- VName child.1 VIdent
-//-
-//- VType.kind "TYPE"
-//- VType.pre_text "int"
-//-
-//- VContext.kind "CONTEXT"
-//- VContext child.0 VPkg
-//- VPkg.pre_text "pkgvar"
-//-
-//- VIdent.kind "IDENTIFIER"
-//- VIdent.pre_text "V"
-//- VIdent link Var
+// - @V defines/binding Var
+// - Var code VarCode
+// - Var typed VarType
+// - VarType code VType
+// -
+// - VarCode child.0 VName
+// - VarCode child.1 VTyped
+// - VTyped.kind "LOOKUP_BY_TYPED"
+// - VarCode.post_child_text " "
+// -
+// - VName child.0 VContext
+// - VName child.1 VIdent
+// -
+// - VType.kind "TYPE"
+// - VType.pre_text "int"
+// -
+// - VContext.kind "CONTEXT"
+// - VContext child.0 VPkg
+// - VPkg.pre_text "pkgvar"
+// -
+// - VIdent.kind "IDENTIFIER"
+// - VIdent.pre_text "V"
+// - VIdent link Var
var V int
diff --git a/kythe/go/indexer/testdata/code/structtype.go b/kythe/go/indexer/testdata/code/structtype.go
index 8e6b12a57..31f04dd53 100644
--- a/kythe/go/indexer/testdata/code/structtype.go
+++ b/kythe/go/indexer/testdata/code/structtype.go
@@ -1,17 +1,17 @@
// Package structtype tests code facts for a named struct type.
package structtype
-//- @T defines/binding Type
-//- Type code TName
-//-
-//- TName child.0 TContext
-//- TName child.1 TIdent
-//-
-//- TContext.kind "CONTEXT"
-//- TContext child.0 TPkg
-//- TPkg.pre_text "structtype"
-//- TIdent.kind "IDENTIFIER"
-//- TIdent.pre_text "T"
+// - @T defines/binding Type
+// - Type code TName
+// -
+// - TName child.0 TContext
+// - TName child.1 TIdent
+// -
+// - TContext.kind "CONTEXT"
+// - TContext child.0 TPkg
+// - TPkg.pre_text "structtype"
+// - TIdent.kind "IDENTIFIER"
+// - TIdent.pre_text "T"
type T struct {
//- @F defines/binding Field
//- Field code FieldCode
diff --git a/kythe/go/indexer/testdata/generics/genericdep.go b/kythe/go/indexer/testdata/generics/genericdep.go
index e2c280db0..1586553f5 100644
--- a/kythe/go/indexer/testdata/generics/genericdep.go
+++ b/kythe/go/indexer/testdata/generics/genericdep.go
@@ -12,13 +12,13 @@ func main() {
c.Element = ""
}
-//- @Number defines/binding Number
-//- Number satisfies Interface
+// - @Number defines/binding Number
+// - Number satisfies Interface
type Number struct{ I int }
-//- @Accept defines/binding NumberAccept
-//- NumberAccept overrides Accept
+// - @Accept defines/binding NumberAccept
+// - NumberAccept overrides Accept
func (n *Number) Accept(i int) { n.I = i }
-//- @Interface ref Interface
+// - @Interface ref Interface
var _ genericinterface.Interface[int] = &Number{42}
diff --git a/kythe/go/indexer/testdata/generics/genericfunc.go b/kythe/go/indexer/testdata/generics/genericfunc.go
index 174fcb2b3..b7ca8bd97 100644
--- a/kythe/go/indexer/testdata/generics/genericfunc.go
+++ b/kythe/go/indexer/testdata/generics/genericfunc.go
@@ -5,14 +5,14 @@ func main() {
Map([]string{}, func(s string) string { return s })
}
-//- @Map defines/binding Func
-//- Func.node/kind function
-//- @#0T defines/binding TVar
-//- TVar.node/kind tvar
-//- @#0U defines/binding UVar
-//- UVar.node/kind tvar
-//- Func tparam.0 TVar
-//- Func tparam.1 UVar
+// - @Map defines/binding Func
+// - Func.node/kind function
+// - @#0T defines/binding TVar
+// - TVar.node/kind tvar
+// - @#0U defines/binding UVar
+// - UVar.node/kind tvar
+// - Func tparam.0 TVar
+// - Func tparam.1 UVar
func Map[T any, U any](l []T, f func(T) U) []U {
//- @U ref UVar
res := make([]U, len(l))
diff --git a/kythe/go/indexer/testdata/generics/genericinterface.go b/kythe/go/indexer/testdata/generics/genericinterface.go
index 0ffada1d0..2e7f89ca3 100644
--- a/kythe/go/indexer/testdata/generics/genericinterface.go
+++ b/kythe/go/indexer/testdata/generics/genericinterface.go
@@ -1,37 +1,37 @@
package genericinterface
-//- @Interface defines/binding Interface
-//- Interface.node/kind interface
-//- @T defines/binding TVar
-//- TVar.node/kind tvar
-//- Interface tparam.0 TVar
+// - @Interface defines/binding Interface
+// - Interface.node/kind interface
+// - @T defines/binding TVar
+// - TVar.node/kind tvar
+// - Interface tparam.0 TVar
type Interface[T any] interface {
//- @Accept defines/binding Accept
//- @T ref TVar
Accept(T)
}
-//- @Thing defines/binding Thing
-//- Thing satisfies Interface
+// - @Thing defines/binding Thing
+// - Thing satisfies Interface
type Thing struct{ S string }
-//- @Accept defines/binding ThingAccept
-//- ThingAccept overrides Accept
+// - @Accept defines/binding ThingAccept
+// - ThingAccept overrides Accept
func (t *Thing) Accept(s string) { t.S = s }
-//- @Interface ref Interface
+// - @Interface ref Interface
var _ Interface[string] = &Thing{"hello"}
-//- @Container defines/binding Container
-//- Container satisfies Interface
+// - @Container defines/binding Container
+// - Container satisfies Interface
type Container[T any] struct {
//- @Element defines/binding Element
//- Element.node/kind variable
Element T
}
-//- @Accept defines/binding ContainerAccept
-//- ContainerAccept overrides Accept
+// - @Accept defines/binding ContainerAccept
+// - ContainerAccept overrides Accept
func (c *Container[T]) Accept(t T) { c.Element = t }
// kythe/go/indexer/genericinterface_test.Interface.T
diff --git a/kythe/go/indexer/testdata/generics/genericmethod.go b/kythe/go/indexer/testdata/generics/genericmethod.go
index 19c5f3863..520dc37dd 100644
--- a/kythe/go/indexer/testdata/generics/genericmethod.go
+++ b/kythe/go/indexer/testdata/generics/genericmethod.go
@@ -8,8 +8,8 @@ func main() {
c.Put("yup")
}
-//- @Container defines/binding Container
-//- @T defines/binding TVar
+// - @Container defines/binding Container
+// - @T defines/binding TVar
type Container[T any] struct {
//- @T ref TVar
Element T
@@ -17,12 +17,12 @@ type Container[T any] struct {
// Methods introduce unique tvars
// TODO(schroederc): relate these to the struct tvar
-//- @Get defines/binding Get
-//- @#0T defines/binding GetTVar
-//- GetTVar.node/kind tvar
-//- @#1T ref GetTVar
-//- !{@#0T ref TVar}
-//- !{@#1T ref TVar}
+// - @Get defines/binding Get
+// - @#0T defines/binding GetTVar
+// - GetTVar.node/kind tvar
+// - @#1T ref GetTVar
+// - !{@#0T ref TVar}
+// - !{@#1T ref TVar}
func (c *Container[T]) Get() T {
//- @T ref GetTVar
//- !{@T ref TVar}
@@ -39,14 +39,14 @@ func (c *Container[T]) Get() T {
//- RecvType.pre_text "*Container[T]"
// And can technically be renamed
-//- @Put defines/binding Put
-//- @#0A defines/binding PutTVar
-//- PutTVar.node/kind tvar
-//- @#1A ref PutTVar
-//- @#2A ref PutTVar
-//- !{@#0A ref GetTVar}
-//- !{@#1A ref GetTVar}
-//- !{@#2A ref GetTVar}
+// - @Put defines/binding Put
+// - @#0A defines/binding PutTVar
+// - PutTVar.node/kind tvar
+// - @#1A ref PutTVar
+// - @#2A ref PutTVar
+// - !{@#0A ref GetTVar}
+// - !{@#1A ref GetTVar}
+// - !{@#2A ref GetTVar}
func (c *Container[A]) Put(t A) A {
//- @A ref PutTVar
//- !{@A ref GetTVar}
@@ -55,7 +55,7 @@ func (c *Container[A]) Put(t A) A {
return temp
}
-//- @Interface defines/binding Interface
+// - @Interface defines/binding Interface
type Interface interface {
//- @Get defines/binding GetI
Get() string
diff --git a/kythe/go/indexer/testdata/generics/genericstruct.go b/kythe/go/indexer/testdata/generics/genericstruct.go
index 4e70b5990..14bcb85c0 100644
--- a/kythe/go/indexer/testdata/generics/genericstruct.go
+++ b/kythe/go/indexer/testdata/generics/genericstruct.go
@@ -23,11 +23,11 @@ func main() {
//- PairApp param.2 Int
}
-//- @Container defines/binding Container
-//- Container.node/kind record
-//- @T defines/binding TVar
-//- TVar.node/kind tvar
-//- Container tparam.0 TVar
+// - @Container defines/binding Container
+// - Container.node/kind record
+// - @T defines/binding TVar
+// - TVar.node/kind tvar
+// - Container tparam.0 TVar
type Container[T any] struct {
//- @T ref TVar
//- @Element defines/binding Element
@@ -37,10 +37,10 @@ type Container[T any] struct {
//- Element.subkind field
}
-//- @T defines/binding TVar2
-//- @U defines/binding UVar
-//- !{@T defines/binding TVar}
-//- !{@T ref TVar}
+// - @T defines/binding TVar2
+// - @U defines/binding UVar
+// - !{@T defines/binding TVar}
+// - !{@T ref TVar}
type Pair[T any, U any] struct {
//- @T ref TVar2
//- !{@T defines/binding TVar}
diff --git a/kythe/go/indexer/testdata/go_indexer_test.bzl b/kythe/go/indexer/testdata/go_indexer_test.bzl
index 0baedc414..050b4c003 100644
--- a/kythe/go/indexer/testdata/go_indexer_test.bzl
+++ b/kythe/go/indexer/testdata/go_indexer_test.bzl
@@ -231,7 +231,7 @@ def go_verifier_test(
log_entries = False,
has_marked_source = False,
allow_duplicates = False):
- opts = ["--use_file_nodes", "--show_goals", "--check_for_singletons"]
+ opts = ["--use_file_nodes", "--show_goals", "--check_for_singletons", "--goal_regex='\\s*//\\s*-(.*)'"]
if log_entries:
opts.append("--show_protos")
if allow_duplicates or len(deps) > 0:
diff --git a/kythe/go/indexer/testdata/initcall.go b/kythe/go/indexer/testdata/initcall.go
index 02bdeb488..63444cb71 100644
--- a/kythe/go/indexer/testdata/initcall.go
+++ b/kythe/go/indexer/testdata/initcall.go
@@ -5,7 +5,7 @@ import "fmt"
// Verify that duplicate anchors are not generated for function calls occurring
// in the initializer of a struct field.
-//- @silly defines/binding Silly
+// - @silly defines/binding Silly
type silly struct {
//- @Q defines/binding SField
//- SField childof Silly
diff --git a/kythe/go/indexer/testdata/integration/marked_source.go b/kythe/go/indexer/testdata/integration/marked_source.go
index a2274f519..f66eaac71 100644
--- a/kythe/go/indexer/testdata/integration/marked_source.go
+++ b/kythe/go/indexer/testdata/integration/marked_source.go
@@ -1,9 +1,9 @@
package marked
-//- @A defines/binding AFunc
-//- AFunc.code/rendered "func test/marked_source.A(test/marked_source.a string, test/marked_source.b int)"
-//- AFunc.code/rendered/identifier "A"
-//- AFunc.code/rendered/params "a,b"
+// - @A defines/binding AFunc
+// - AFunc.code/rendered "func test/marked_source.A(test/marked_source.a string, test/marked_source.b int)"
+// - AFunc.code/rendered/identifier "A"
+// - AFunc.code/rendered/params "a,b"
func A(a string, b int) {}
func B() { A("hello", 42) }
diff --git a/kythe/go/indexer/testdata/override.go b/kythe/go/indexer/testdata/override.go
index f038d7a19..fb7302a88 100644
--- a/kythe/go/indexer/testdata/override.go
+++ b/kythe/go/indexer/testdata/override.go
@@ -7,8 +7,8 @@ import (
"strings"
)
-//- @Thinger defines/binding Thinger
-//- Thinger.node/kind interface
+// - @Thinger defines/binding Thinger
+// - Thinger.node/kind interface
type Thinger interface {
//- @Thing defines/binding AbstractThing
//- Thing.node/kind function
@@ -17,9 +17,9 @@ type Thinger interface {
Thing()
}
-//- @Stuffer defines/binding Stuffer
-//- Stuffer.node/kind interface
-//- Stuffer extends Thinger
+// - @Stuffer defines/binding Stuffer
+// - Stuffer.node/kind interface
+// - Stuffer extends Thinger
type Stuffer interface {
Thinger
@@ -30,55 +30,55 @@ type Stuffer interface {
Stuff()
}
-//- @foo defines/binding Foo
-//- Foo.node/kind record
-//- Foo satisfies Thinger
-//- Foo satisfies Stuffer
+// - @foo defines/binding Foo
+// - Foo.node/kind record
+// - Foo satisfies Thinger
+// - Foo satisfies Stuffer
type foo struct{}
-//- @Thing defines/binding ConcreteThing
-//- ConcreteThing.node/kind function
-//- ConcreteThing childof Foo
-//- ConcreteThing overrides AbstractThing
-//- ConcreteThing typed ConcreteThingType
-//- ConcreteThingType satisfies AbstractThingType
-//- !{ ConcreteThing overrides FoilThing }
+// - @Thing defines/binding ConcreteThing
+// - ConcreteThing.node/kind function
+// - ConcreteThing childof Foo
+// - ConcreteThing overrides AbstractThing
+// - ConcreteThing typed ConcreteThingType
+// - ConcreteThingType satisfies AbstractThingType
+// - !{ ConcreteThing overrides FoilThing }
func (foo) Thing() {}
-//- @Stuff defines/binding ConcreteStuff
-//- ConcreteStuff.node/kind function
-//- ConcreteStuff childof Foo
-//- ConcreteStuff overrides AbstractStuff
-//- ConcreteStuff typed ConcreteStuffType
-//- ConcreteStuffType satisfies AbstractStuffType
+// - @Stuff defines/binding ConcreteStuff
+// - ConcreteStuff.node/kind function
+// - ConcreteStuff childof Foo
+// - ConcreteStuff overrides AbstractStuff
+// - ConcreteStuff typed ConcreteStuffType
+// - ConcreteStuffType satisfies AbstractStuffType
func (foo) Stuff() {}
-//- @bar defines/binding Bar
-//- Bar.node/kind record
-//- Bar satisfies Thinger
-//- Bar satisfies vname("type Stringer",_,_,"fmt","go")
-//- !{ Bar satisfies Stuffer }
+// - @bar defines/binding Bar
+// - Bar.node/kind record
+// - Bar satisfies Thinger
+// - Bar satisfies vname("type Stringer",_,_,"fmt","go")
+// - !{ Bar satisfies Stuffer }
type bar struct{}
-//- @Thing defines/binding OtherConcreteThing
-//- OtherConcreteThing.node/kind function
-//- OtherConcreteThing childof Bar
-//- OtherConcreteThing overrides AbstractThing
-//- !{ OtherConcreteThing overrides FoilThing }
+// - @Thing defines/binding OtherConcreteThing
+// - OtherConcreteThing.node/kind function
+// - OtherConcreteThing childof Bar
+// - OtherConcreteThing overrides AbstractThing
+// - !{ OtherConcreteThing overrides FoilThing }
func (*bar) Thing() {}
-//- @String defines/binding String
-//- String.node/kind function
-//- String childof Bar
-//- String overrides vname("method Stringer.String",_,_,"fmt","go")
+// - @String defines/binding String
+// - String.node/kind function
+// - String childof Bar
+// - String overrides vname("method Stringer.String",_,_,"fmt","go")
func (*bar) String() string { return "" }
// Foil has a method with the same name as Thinger, but is not a compatible
// type signature. We use this to verify that we don't try to emit override
// edges unless the assignability check passes.
//
-//- @Foil defines/binding Foil
-//- Foil.node/kind interface
+// - @Foil defines/binding Foil
+// - Foil.node/kind interface
type Foil interface {
//- @Thing defines/binding FoilThing
//- FoilThing.node/kind function
@@ -86,9 +86,9 @@ type Foil interface {
Thing(bool)
}
-//- @Grower defines/binding Grower
-//- Grower.node/kind interface
-//- StringBuilder satisfies Grower
+// - @Grower defines/binding Grower
+// - Grower.node/kind interface
+// - StringBuilder satisfies Grower
type Grower interface {
//- @Grow defines/binding Grow
//- Grow.node/kind function
@@ -97,8 +97,8 @@ type Grower interface {
//- StringBuilderGrow overrides Grow
}
-//- @Builder ref StringBuilder
+// - @Builder ref StringBuilder
var _ Grower = &strings.Builder{}
-//- @Grow ref StringBuilderGrow
+// - @Grow ref StringBuilderGrow
func init() { (&strings.Builder{}).Grow(10) }
diff --git a/kythe/go/indexer/testdata/structinit.go b/kythe/go/indexer/testdata/structinit.go
index 86112894b..b8d0768ea 100644
--- a/kythe/go/indexer/testdata/structinit.go
+++ b/kythe/go/indexer/testdata/structinit.go
@@ -1,8 +1,8 @@
package structinit
-//- @Inky defines/binding Inky
-//- Inky.node/kind record
-//- Inky.subkind struct
+// - @Inky defines/binding Inky
+// - Inky.node/kind record
+// - Inky.subkind struct
type Inky struct {
//- @Pinky defines/binding Pinky
//- Pinky.node/kind variable
diff --git a/kythe/go/indexer/testdata/types.go b/kythe/go/indexer/testdata/types.go
index eb87b6026..439512d98 100644
--- a/kythe/go/indexer/testdata/types.go
+++ b/kythe/go/indexer/testdata/types.go
@@ -154,62 +154,62 @@ import "fmt"
//- EmptyTuple param.0 TupleBuiltin
//- EmptyTuple code TupleTAppCode
-//- @f0 defines/binding F0
-//- F0 typed NullFuncType
-//- NullFuncType.node/kind tapp
-//- NullFuncType param.0 FnBuiltin
-//- NullFuncType param.1 EmptyTuple
-//- NullFuncType param.2 EmptyTuple
-//- !{ NullFuncType param.3 _ }
-//- NullFuncType code VoidFnTAppCode
+// - @f0 defines/binding F0
+// - F0 typed NullFuncType
+// - NullFuncType.node/kind tapp
+// - NullFuncType param.0 FnBuiltin
+// - NullFuncType param.1 EmptyTuple
+// - NullFuncType param.2 EmptyTuple
+// - !{ NullFuncType param.3 _ }
+// - NullFuncType code VoidFnTAppCode
func f0() {}
-//- @f1 defines/binding F1
-//- F1 typed F1FuncType
-//- F1FuncType.node/kind tapp
-//- F1FuncType param.0 FnBuiltin
-//- F1FuncType param.1 EmptyTuple
-//- F1FuncType param.2 EmptyTuple
-//- F1FuncType param.3 IntBuiltin
-//- F1FuncType param.4 BoolBuiltin
-//- F1FuncType param.5 StringBuiltin
+// - @f1 defines/binding F1
+// - F1 typed F1FuncType
+// - F1FuncType.node/kind tapp
+// - F1FuncType param.0 FnBuiltin
+// - F1FuncType param.1 EmptyTuple
+// - F1FuncType param.2 EmptyTuple
+// - F1FuncType param.3 IntBuiltin
+// - F1FuncType param.4 BoolBuiltin
+// - F1FuncType param.5 StringBuiltin
func f1(a int, b bool, c string) {}
-//- @f2 defines/binding F2
-//- F2 typed F2FuncType
-//- F2FuncType.node/kind tapp
-//- F2FuncType param.0 FnBuiltin
-//- F2FuncType param.1 IntBuiltin
-//- F2FuncType param.2 EmptyTuple
-//- !{ NullFuncType param.3 _ }
-//- F2FuncType code FnTAppCode
+// - @f2 defines/binding F2
+// - F2 typed F2FuncType
+// - F2FuncType.node/kind tapp
+// - F2FuncType param.0 FnBuiltin
+// - F2FuncType param.1 IntBuiltin
+// - F2FuncType param.2 EmptyTuple
+// - !{ NullFuncType param.3 _ }
+// - F2FuncType code FnTAppCode
func f2() int { return 0 }
-//- @f3 defines/binding F3
-//- F3 typed F3FuncType
-//- F3FuncType.node/kind tapp
-//- F3FuncType param.0 FnBuiltin
-//- F3FuncType param.1 F3Return
-//- F3FuncType param.2 EmptyTuple
-//- F3Return.node/kind tapp
-//- F3Return param.0 TupleBuiltin
-//- F3Return param.1 IntBuiltin
-//- F3Return param.2 BoolBuiltin
-//- !{ NullFuncType param.3 _ }
+// - @f3 defines/binding F3
+// - F3 typed F3FuncType
+// - F3FuncType.node/kind tapp
+// - F3FuncType param.0 FnBuiltin
+// - F3FuncType param.1 F3Return
+// - F3FuncType param.2 EmptyTuple
+// - F3Return.node/kind tapp
+// - F3Return param.0 TupleBuiltin
+// - F3Return param.1 IntBuiltin
+// - F3Return param.2 BoolBuiltin
+// - !{ NullFuncType param.3 _ }
func f3() (int, bool) { return 0, false }
-//- @f4 defines/binding F4
-//- F4 typed F4FuncType
-//- F4FuncType.node/kind tapp
-//- F4FuncType param.0 FnBuiltin
-//- F4FuncType param.1 EmptyTuple
-//- F4FuncType param.2 EmptyTuple
-//- F4FuncType param.3 IntBuiltin
-//- F4FuncType param.4 VariadicInt
-//- VariadicInt.node/kind tapp
-//- VariadicInt param.0 VariadicBuiltin
-//- VariadicInt param.1 IntBuiltin
-//- VariadicInt code VariadicTAppCode
+// - @f4 defines/binding F4
+// - F4 typed F4FuncType
+// - F4FuncType.node/kind tapp
+// - F4FuncType param.0 FnBuiltin
+// - F4FuncType param.1 EmptyTuple
+// - F4FuncType param.2 EmptyTuple
+// - F4FuncType param.3 IntBuiltin
+// - F4FuncType param.4 VariadicInt
+// - VariadicInt.node/kind tapp
+// - VariadicInt param.0 VariadicBuiltin
+// - VariadicInt param.1 IntBuiltin
+// - VariadicInt code VariadicTAppCode
func f4(a int, b ...int) {}
func paramTypes(
@@ -231,12 +231,12 @@ func retTypes() (
return 0, nil
}
-//- @EmptyStruct defines/binding EmptyStruct
-//- EmptyStruct typed EmptyStruct
+// - @EmptyStruct defines/binding EmptyStruct
+// - EmptyStruct typed EmptyStruct
type EmptyStruct struct{}
-//- @S defines/binding S
-//- S.node/kind record
+// - @S defines/binding S
+// - S.node/kind record
type S struct {
//- @Float64Field defines/binding Float64Field
//- Float64Field.node/kind variable
@@ -310,34 +310,34 @@ type S struct {
SendIntChan chan<- int
}
-//- @sv defines/binding SVar
-//- SVar.node/kind variable
-//- SVar typed S
+// - @sv defines/binding SVar
+// - SVar.node/kind variable
+// - SVar typed S
var sv = S{}
-//- @Method defines/binding Method
-//- Method typed MethodType
-//- MethodType.node/kind tapp
-//- MethodType param.0 FnBuiltin
-//- MethodType param.1 IntBuiltin
-//- MethodType param.2 S
-//- MethodType code MethodTAppCode
+// - @Method defines/binding Method
+// - Method typed MethodType
+// - MethodType.node/kind tapp
+// - MethodType param.0 FnBuiltin
+// - MethodType param.1 IntBuiltin
+// - MethodType param.2 S
+// - MethodType code MethodTAppCode
func (s S) Method() int { return 0 }
-//- @PMethod defines/binding PMethod
-//- PMethod typed PMethodType
-//- PMethodType.node/kind tapp
-//- PMethodType param.0 FnBuiltin
-//- PMethodType param.1 EmptyTuple
-//- PMethodType param.2 SPointer
-//- SPointer.node/kind tapp
-//- SPointer param.0 PointerBuiltin
-//- SPointer param.1 S
-//- MethodType code VoidMethodTAppCode
+// - @PMethod defines/binding PMethod
+// - PMethod typed PMethodType
+// - PMethodType.node/kind tapp
+// - PMethodType param.0 FnBuiltin
+// - PMethodType param.1 EmptyTuple
+// - PMethodType param.2 SPointer
+// - SPointer.node/kind tapp
+// - SPointer param.0 PointerBuiltin
+// - SPointer param.1 S
+// - MethodType code VoidMethodTAppCode
func (s *S) PMethod() {}
-//- @Iter defines/binding Iter
-//- Iter.node/kind interface
+// - @Iter defines/binding Iter
+// - Iter.node/kind interface
type Iter interface {
//- @Method defines/binding IMethod
//- IMethod typed IMethodType
@@ -348,13 +348,13 @@ type Iter interface {
Method() int
}
-//- @iv defines/binding IVar
-//- IVar.node/kind variable
-//- IVar typed Iter
+// - @iv defines/binding IVar
+// - IVar.node/kind variable
+// - IVar typed Iter
var iv Iter
-//- @main defines/binding Main
-//- Main typed NullFuncType
+// - @main defines/binding Main
+// - Main typed NullFuncType
func main() {
//- @i defines/binding LocalAssign
//- LocalAssign.node/kind variable
@@ -397,7 +397,7 @@ func f(
}
// TODO(schroederc): taliases
-//- @StringAlias defines/binding StringAlias
-//- StringAlias.node/kind record
-//- StringAlias typed StringBuiltin
+// - @StringAlias defines/binding StringAlias
+// - StringAlias.node/kind record
+// - StringAlias typed StringBuiltin
type StringAlias = string
diff --git a/kythe/go/indexer/testdata/unsafe.go b/kythe/go/indexer/testdata/unsafe.go
index 2e48ec2d0..5015a892a 100644
--- a/kythe/go/indexer/testdata/unsafe.go
+++ b/kythe/go/indexer/testdata/unsafe.go
@@ -4,8 +4,8 @@ package magic
//- @"\"unsafe\"" ref/imports Unsafe=vname("package", "golang.org", _, "unsafe", "go")
import "unsafe"
-//- @foo defines/binding Foo
-//- Foo.node/kind variable
-//- @unsafe ref Unsafe
-//- @Pointer ref _UnsafePointer
+// - @foo defines/binding Foo
+// - Foo.node/kind variable
+// - @unsafe ref Unsafe
+// - @Pointer ref _UnsafePointer
var foo unsafe.Pointer