Skip to content

Commit

Permalink
regexp: fix a few function names on comments
Browse files Browse the repository at this point in the history
Change-Id: I192dd34c677e52e16f0ef78e1dae58a78f6d1aac
GitHub-Last-Rev: 1638a74
GitHub-Pull-Request: golang#55967
Reviewed-on: https://go-review.googlesource.com/c/go/+/436885
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
  • Loading branch information
cuishuang authored and gopherbot committed Oct 2, 2022
1 parent 82e357d commit 1888875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/regexp/onepass.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/regexp/syntax/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 1888875

Please sign in to comment.