Commit c0c30258 authored by Rob Pike's avatar Rob Pike

turn spaces to tabs

replace ifs with switch
still runs!

SVN=118947
parent 9119f55e
......@@ -28,10 +28,10 @@ func main() {
case '[':
if a[p] == 0 {
for nest := 1; nest > 0; pc++ {
if prog[pc+1] == ']' {
switch prog[pc+1] {
case ']':
nest--;
}
if prog[pc+1] == '[' {
case '[':
nest++;
}
}
......@@ -39,10 +39,10 @@ func main() {
case ']':
if a[p] != 0 {
for nest := -1; nest < 0; pc-- {
if prog[pc-1] == ']' {
switch prog[pc-1] {
case ']':
nest--;
}
if prog[pc-1] == '[' {
case '[':
nest++;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment