Fix misplaced line number (was wrongly formatted and before procedure)

This commit is contained in:
Mikkel Hjortshoej
2020-07-02 15:31:40 +02:00
parent 51e50d3e31
commit 730f9ee0b3

View File

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