summaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2022-01-30 19:22:46 -0500
committerRuss Cox <rsc@golang.org>2022-04-01 18:18:05 +0000
commit89dff118ada91061350aa149b54a2ab4fdbd6810 (patch)
tree75e16709eb36fdf6433fae7bc4ba1ddc44a76c5e /src/cmd/compile/internal/syntax
parent7d87ccc860dc31c0cd60faf00720e2f30fd37efb (diff)
downloadgo-git-89dff118ada91061350aa149b54a2ab4fdbd6810.tar.gz
all: fix TODO comment hanging indents
For whatever reason (perhaps some tool does this), a handful of comments, including some doc comments, have TODOs formatted like: // TODO(name): Text here and // more text aligned // under first text. In doc comments the second line turns into a <pre> block, which is undesirable in this context. Rewrite those to unindent, like this instead: // TODO(name): Text here and // more text aligned // at left column. For #51082. Change-Id: Ibf5145659a61ebf9496f016752a709a7656d2d4b Reviewed-on: https://go-review.googlesource.com/c/go/+/384258 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax')
-rw-r--r--src/cmd/compile/internal/syntax/nodes.go2
-rw-r--r--src/cmd/compile/internal/syntax/pos.go2
-rw-r--r--src/cmd/compile/internal/syntax/tokens.go4
-rw-r--r--src/cmd/compile/internal/syntax/walk.go2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/syntax/nodes.go b/src/cmd/compile/internal/syntax/nodes.go
index 2f9b43edef..b0a0918e77 100644
--- a/src/cmd/compile/internal/syntax/nodes.go
+++ b/src/cmd/compile/internal/syntax/nodes.go
@@ -462,7 +462,7 @@ func (simpleStmt) aSimpleStmt() {}
// Comments
// TODO(gri) Consider renaming to CommentPos, CommentPlacement, etc.
-// Kind = Above doesn't make much sense.
+// Kind = Above doesn't make much sense.
type CommentKind uint
const (
diff --git a/src/cmd/compile/internal/syntax/pos.go b/src/cmd/compile/internal/syntax/pos.go
index 1494c0989f..b5e53d268b 100644
--- a/src/cmd/compile/internal/syntax/pos.go
+++ b/src/cmd/compile/internal/syntax/pos.go
@@ -24,7 +24,7 @@ type Pos struct {
func MakePos(base *PosBase, line, col uint) Pos { return Pos{base, sat32(line), sat32(col)} }
// TODO(gri) IsKnown makes an assumption about linebase < 1.
-// Maybe we should check for Base() != nil instead.
+// Maybe we should check for Base() != nil instead.
func (pos Pos) Pos() Pos { return pos }
func (pos Pos) IsKnown() bool { return pos.line > 0 }
diff --git a/src/cmd/compile/internal/syntax/tokens.go b/src/cmd/compile/internal/syntax/tokens.go
index 60eae36ec9..6dece1aa5b 100644
--- a/src/cmd/compile/internal/syntax/tokens.go
+++ b/src/cmd/compile/internal/syntax/tokens.go
@@ -93,8 +93,8 @@ func contains(tokset uint64, tok token) bool {
type LitKind uint8
// TODO(gri) With the 'i' (imaginary) suffix now permitted on integer
-// and floating-point numbers, having a single ImagLit does
-// not represent the literal kind well anymore. Remove it?
+// and floating-point numbers, having a single ImagLit does
+// not represent the literal kind well anymore. Remove it?
const (
IntLit LitKind = iota
FloatLit
diff --git a/src/cmd/compile/internal/syntax/walk.go b/src/cmd/compile/internal/syntax/walk.go
index b025844204..8f1d566155 100644
--- a/src/cmd/compile/internal/syntax/walk.go
+++ b/src/cmd/compile/internal/syntax/walk.go
@@ -52,7 +52,7 @@ func Crawl(root Node, f func(Node) bool) {
// field lists such as type T in "a, b, c T"). Such shared nodes are
// walked multiple times.
// TODO(gri) Revisit this design. It may make sense to walk those nodes
-// only once. A place where this matters is types2.TestResolveIdents.
+// only once. A place where this matters is types2.TestResolveIdents.
func Walk(root Node, v Visitor) {
walker{v}.node(root)
}