diff options
Diffstat (limited to 'libregex/redump.myr')
-rw-r--r-- | libregex/redump.myr | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libregex/redump.myr b/libregex/redump.myr index 7f7ed40..47df80d 100644 --- a/libregex/redump.myr +++ b/libregex/redump.myr @@ -42,7 +42,7 @@ const dump = {re, fd while true match bio.readln(fd) | `std.Some ln: - show(regex.exec(re, ln)) + show(re, ln, regex.exec(re, ln)) std.slfree(ln) | `std.None: break @@ -50,7 +50,7 @@ const dump = {re, fd ;; } -const show = {mg +const show = {re, ln, mg var i match mg @@ -61,5 +61,10 @@ const show = {mg ;; | `std.None: std.put("Match failed\n") + std.put("{}\n", ln) + for i = 0; i < re.strp - 1; i++ + std.put(" ") + ;; + std.put("^\n") ;; } |