Revert to old format and fix : when no file opt specified

This commit is contained in:
Mikkel Hjortshoej
2020-07-02 16:11:41 +02:00
parent 730f9ee0b3
commit 83f553cd89

View File

@@ -127,20 +127,19 @@ do_location_header :: proc(opts: Options, buf: ^strings.Builder, location := #ca
if Location_File_Opts & opts != nil {
fmt.sbprint(buf, file);
}
if .Procedure in opts {
if Location_File_Opts & opts != nil {
fmt.sbprint(buf, ":");
}
fmt.sbprintf(buf, "%s()", location.procedure);
}
if .Line in opts {
if (Location_File_Opts | {.Procedure}) & opts != nil {
if Location_File_Opts & opts != nil {
fmt.sbprint(buf, ":");
}
fmt.sbprint(buf, location.line);
}
if .Procedure in opts {
if (Location_File_Opts | {.Procedure}) & opts != nil {
fmt.sbprint(buf, ":");
}
fmt.sbprintf(buf, "%s()", location.procedure);
}
fmt.sbprint(buf, "] ");
}