aboutsummaryrefslogtreecommitdiff
path: root/src/regexp
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2022-09-30 09:38:39 +0000
committerGopher Robot <gobot@golang.org>2022-10-02 02:31:23 +0000
commit18888751828c329ddf5efdd7ec1b39adf0b6ea00 (patch)
tree349aa7f0e68ca4d7c745ddf6853aa700d843b25c /src/regexp
parent82e357d6d5944fc5b0293085a0305fe328c505ea (diff)
downloadgo-18888751828c329ddf5efdd7ec1b39adf0b6ea00.tar.gz
go-18888751828c329ddf5efdd7ec1b39adf0b6ea00.zip
regexp: fix a few function names on comments
Change-Id: I192dd34c677e52e16f0ef78e1dae58a78f6d1aac GitHub-Last-Rev: 1638a7468951df72f13fea34855b6a4fcbb08226 GitHub-Pull-Request: golang/go#55967 Reviewed-on: https://go-review.googlesource.com/c/go/+/436885 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/regexp')
-rw-r--r--src/regexp/onepass.go6
-rw-r--r--src/regexp/syntax/parse.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/regexp/onepass.go b/src/regexp/onepass.go
index bc47f4c4a8..89040d7b0e 100644
--- a/src/regexp/onepass.go
+++ b/src/regexp/onepass.go
@@ -33,10 +33,10 @@ type onePassInst struct {
Next []uint32
}
-// OnePassPrefix returns a literal string that all matches for the
+// onePassPrefix returns a literal string that all matches for the
// regexp must start with. Complete is true if the prefix
// is the entire match. Pc is the index of the last rune instruction
-// in the string. The OnePassPrefix skips over the mandatory
+// in the string. The onePassPrefix skips over the mandatory
// EmptyBeginText
func onePassPrefix(p *syntax.Prog) (prefix string, complete bool, pc uint32) {
i := &p.Inst[p.Start]
@@ -68,7 +68,7 @@ func onePassPrefix(p *syntax.Prog) (prefix string, complete bool, pc uint32) {
return buf.String(), complete, pc
}
-// OnePassNext selects the next actionable state of the prog, based on the input character.
+// onePassNext selects the next actionable state of the prog, based on the input character.
// It should only be called when i.Op == InstAlt or InstAltMatch, and from the one-pass machine.
// One of the alternates may ultimately lead without input to end of line. If the instruction
// is InstAltMatch the path to the InstMatch is in i.Out, the normal node in i.Next.
diff --git a/src/regexp/syntax/parse.go b/src/regexp/syntax/parse.go
index 350f297e5b..861c06d999 100644
--- a/src/regexp/syntax/parse.go
+++ b/src/regexp/syntax/parse.go
@@ -1800,7 +1800,7 @@ func appendClass(r []rune, x []rune) []rune {
return r
}
-// appendFolded returns the result of appending the case folding of the class x to the class r.
+// appendFoldedClass returns the result of appending the case folding of the class x to the class r.
func appendFoldedClass(r []rune, x []rune) []rune {
for i := 0; i < len(x); i += 2 {
r = appendFoldedRange(r, x[i], x[i+1])