mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
parent
48b3156908
commit
45cba57e89
5 changed files with 39 additions and 39 deletions
|
|
@ -440,7 +440,7 @@ func (p *parser) term() (start, end instr) {
|
|||
// The other functions (closure(), concatenation() etc.) assume
|
||||
// it's safe to recur to here.
|
||||
if p.error != "" {
|
||||
return
|
||||
return;
|
||||
}
|
||||
switch c := p.c(); c {
|
||||
case '|', endOfFile:
|
||||
|
|
@ -473,7 +473,7 @@ func (p *parser) term() (start, end instr) {
|
|||
p.nextc();
|
||||
start = p.charClass();
|
||||
if p.error != "" {
|
||||
return
|
||||
return;
|
||||
}
|
||||
if p.c() != ']' {
|
||||
p.error = ErrUnmatchedLbkt;
|
||||
|
|
@ -580,7 +580,7 @@ func (p *parser) concatenation() (start, end instr) {
|
|||
for {
|
||||
nstart, nend := p.closure();
|
||||
if p.error != "" {
|
||||
return
|
||||
return;
|
||||
}
|
||||
switch {
|
||||
case nstart == nil: // end of this concatenation
|
||||
|
|
@ -602,7 +602,7 @@ func (p *parser) concatenation() (start, end instr) {
|
|||
func (p *parser) regexp() (start, end instr) {
|
||||
start, end = p.concatenation();
|
||||
if p.error != "" {
|
||||
return
|
||||
return;
|
||||
}
|
||||
for {
|
||||
switch p.c() {
|
||||
|
|
@ -612,7 +612,7 @@ func (p *parser) regexp() (start, end instr) {
|
|||
p.nextc();
|
||||
nstart, nend := p.concatenation();
|
||||
if p.error != "" {
|
||||
return
|
||||
return;
|
||||
}
|
||||
alt := new(_Alt);
|
||||
p.re.add(alt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue