mirror of https://github.com/golang/go.git
turn spaces to tabs
replace ifs with switch still runs! SVN=118947
This commit is contained in:
parent
9119f55e6d
commit
c0c30258be
|
|
@ -28,10 +28,10 @@ func main() {
|
||||||
case '[':
|
case '[':
|
||||||
if a[p] == 0 {
|
if a[p] == 0 {
|
||||||
for nest := 1; nest > 0; pc++ {
|
for nest := 1; nest > 0; pc++ {
|
||||||
if prog[pc+1] == ']' {
|
switch prog[pc+1] {
|
||||||
|
case ']':
|
||||||
nest--;
|
nest--;
|
||||||
}
|
case '[':
|
||||||
if prog[pc+1] == '[' {
|
|
||||||
nest++;
|
nest++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -39,10 +39,10 @@ func main() {
|
||||||
case ']':
|
case ']':
|
||||||
if a[p] != 0 {
|
if a[p] != 0 {
|
||||||
for nest := -1; nest < 0; pc-- {
|
for nest := -1; nest < 0; pc-- {
|
||||||
if prog[pc-1] == ']' {
|
switch prog[pc-1] {
|
||||||
|
case ']':
|
||||||
nest--;
|
nest--;
|
||||||
}
|
case '[':
|
||||||
if prog[pc-1] == '[' {
|
|
||||||
nest++;
|
nest++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue