]> Cypherpunks repositories - gostls13.git/commitdiff
regexp/syntax: remove unused flags parameter
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 6 Mar 2017 08:59:36 +0000 (09:59 +0100)
committerIan Lance Taylor <iant@golang.org>
Mon, 6 Mar 2017 19:11:09 +0000 (19:11 +0000)
Found by github.com/mvdan/unparam.

Change-Id: I186d2afd067e97eb05d65c4599119b347f82867d
Reviewed-on: https://go-review.googlesource.com/37840
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/regexp/syntax/parse.go

index 7b8be55ddb13e71694e93d22c84569e380da82d5..8c6d43a70636944fca38dd5a8af0e3158614fc87 100644 (file)
@@ -381,7 +381,7 @@ func (p *parser) collapse(subs []*Regexp, op Op) *Regexp {
                }
        }
        if op == OpAlternate {
-               re.Sub = p.factor(re.Sub, re.Flags)
+               re.Sub = p.factor(re.Sub)
                if len(re.Sub) == 1 {
                        old := re
                        re = re.Sub[0]
@@ -402,7 +402,7 @@ func (p *parser) collapse(subs []*Regexp, op Op) *Regexp {
 // which simplifies by character class introduction to
 //     A(B[CD]|EF)|BC[XY]
 //
-func (p *parser) factor(sub []*Regexp, flags Flags) []*Regexp {
+func (p *parser) factor(sub []*Regexp) []*Regexp {
        if len(sub) < 2 {
                return sub
        }