remove semis after statements in one-statement statement lists

R=rsc, r
http://go/go-review/1025029
This commit is contained in:
Robert Griesemer 2009-11-09 12:07:39 -08:00
parent 18ccbc69f8
commit 40621d5c0d
408 changed files with 7859 additions and 7859 deletions

View file

@ -18,55 +18,55 @@ import (
func valueToString(val Value) string {
var str string;
if val == nil {
return "<nil>";
return "<nil>"
}
typ := val.Type();
switch val := val.(type) {
case *IntValue:
return strconv.Uitoa64(uint64(val.Get()));
return strconv.Uitoa64(uint64(val.Get()))
case *Int8Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Int16Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Int32Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Int64Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *UintValue:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Uint8Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Uint16Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Uint32Value:
return strconv.Itoa64(int64(val.Get()));
return strconv.Itoa64(int64(val.Get()))
case *Uint64Value:
return strconv.Uitoa64(uint64(val.Get()));
return strconv.Uitoa64(uint64(val.Get()))
case *FloatValue:
if strconv.FloatSize == 32 {
return strconv.Ftoa32(float32(val.Get()), 'g', -1);
return strconv.Ftoa32(float32(val.Get()), 'g', -1)
} else {
return strconv.Ftoa64(float64(val.Get()), 'g', -1);
return strconv.Ftoa64(float64(val.Get()), 'g', -1)
}
case *Float32Value:
return strconv.Ftoa32(val.Get(), 'g', -1);
return strconv.Ftoa32(val.Get(), 'g', -1)
case *Float64Value:
return strconv.Ftoa64(val.Get(), 'g', -1);
return strconv.Ftoa64(val.Get(), 'g', -1)
case *StringValue:
return val.Get();
return val.Get()
case *BoolValue:
if val.Get() {
return "true";
return "true"
} else {
return "false";
return "false"
}
case *PtrValue:
v := val;
str = typ.String() + "(";
if v.IsNil() {
str += "0";
str += "0"
} else {
str += "&" + valueToString(v.Elem());
str += "&" + valueToString(v.Elem())
}
str += ")";
return str;
@ -76,7 +76,7 @@ func valueToString(val Value) string {
str += "{";
for i := 0; i < v.Len(); i++ {
if i > 0 {
str += ", ";
str += ", "
}
str += valueToString(v.Elem(i));
}
@ -99,19 +99,19 @@ func valueToString(val Value) string {
str += "{";
for i, n := 0, v.NumField(); i < n; i++ {
if i > 0 {
str += ", ";
str += ", "
}
str += valueToString(v.Field(i));
}
str += "}";
return str;
case *InterfaceValue:
return typ.String() + "(" + valueToString(val.Elem()) + ")";
return typ.String() + "(" + valueToString(val.Elem()) + ")"
case *FuncValue:
v := val;
return typ.String() + "(" + strconv.Itoa64(int64(v.Get())) + ")";
default:
panicln("valueToString: can't print type ", typ.String());
panicln("valueToString: can't print type ", typ.String())
}
return "valueToString: can't happen";
}