summaryrefslogtreecommitdiff
path: root/uncrust.go
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@kesim.org>2024-12-11 19:40:08 +0100
committerÖzgür Kesim <oec@kesim.org>2024-12-11 19:40:08 +0100
commit94d148b913218f0e577cf7a2ef7cf65b8880d564 (patch)
tree53976d01e5c60b331f4e5705d6fbb84837a07c54 /uncrust.go
parent998763e427e5855577db4f6a8b97fff506f38178 (diff)
added another output line rxp
Diffstat (limited to 'uncrust.go')
-rw-r--r--uncrust.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/uncrust.go b/uncrust.go
index e8dd564..85c3f9b 100644
--- a/uncrust.go
+++ b/uncrust.go
@@ -21,6 +21,7 @@ var (
fl_verbose = flag.Bool("v", false, "Verbosity on")
pos_rx = regexp.MustCompile(`.* orig line is ([\d]+), orig col is ([\d]+)`)
+ lin_rx = regexp.MustCompile(`.* orig line is ([\d]+)`)
grb_rx = regexp.MustCompile(`stdin:([\d]+) Garbage in col ([\d]+)`)
)
@@ -66,6 +67,7 @@ func main() {
if len(samfile) != 0 {
str = strings.ReplaceAll(str, "stdin, open_line is ", samfile+":")
str = pos_rx.ReplaceAllString(str, fmt.Sprintf("%s:$1:#$2", samfile))
+ str = lin_rx.ReplaceAllString(str, fmt.Sprintf("%s:$1", samfile))
str = grb_rx.ReplaceAllString(str, fmt.Sprintf("%s:$1:#$2", samfile))
}
log.Fatal("error: " + str)