fmt.Printf("%s: %s\n", expr.Pos(), message);
R=gri
DELTA=15 (1 added, 3 deleted, 11 changed)
OCL=34706
CL=34708
}
-func (pos *Position) String() string {
- if pos != nil {
- s := pos.Filename;
- if pos.IsValid() {
- if s != "" {
- s += ":";
- }
- s += fmt.Sprintf("%d:%d", pos.Line, pos.Column);
- }
+func (pos Position) String() string {
+ s := pos.Filename;
+ if pos.IsValid() {
if s != "" {
- return s;
+ s += ":";
}
+ s += fmt.Sprintf("%d:%d", pos.Line, pos.Column);
+ }
+ if s == "" {
+ s = "???";
}
- return "<unknown position>";
+ return s;
}