print matches like rakudo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/CORE.setting b/lib/CORE.setting | |
index ffecaae..4186f5e 100644 | |
--- a/lib/CORE.setting | |
+++ b/lib/CORE.setting | |
@@ -2806,6 +2806,15 @@ my class Match is Cool does Associative does Positional { | |
"#<match from({ self.from }) to({ self.to }) text({ self }) pos({ @pos.perl }) named({ %(self).perl })>" | |
} | |
+ multi method gist ($d = 0) { | |
+ return "#<failed match>" unless self; | |
+ my $s = ' ' x ($d + 1); | |
+ my $r = ("=> " if $d) ~ "\x[FF62]{self}\x[FF63]\n"; | |
+ for @.caps { | |
+ $r ~= $s ~ (.key // '?') ~ ' ' ~ .value.gist($d + 1) | |
+ } | |
+ $r; | |
+ } | |
method CURSOR() { Q:CgOp { (cursor_unmatch (cast cursor (@ {self}))) } } | |
method cursor() { Q:CgOp { (cursor_unmatch (cast cursor (@ {self}))) } } | |
method reduced() { Q:CgOp { (box Str (cursor_reduced (cast cursor (@ {self})))) } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test Summary Report
t/spec/S03-junctions/boolean-context.t (Wstat: 0 Tests: 73 Failed: 2)
Failed tests: 49, 51
t/spec/S05-capture/match-object.t (Wstat: 0 Tests: 1 Failed: 0)
Parse errors: Bad plan. You planned 21 tests but ran 1.
t/spec/S05-substitution/subst.t (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: No plan found in TAP output
t/spec/S32-list/roll.t (Wstat: 0 Tests: 40 Failed: 0)
TODO passed: 40
t/spec/S32-str/sprintf.t (Wstat: 0 Tests: 125 Failed: 50)
Failed tests: 63-112
Files=583, Tests=23081, 681 wallclock secs ( 8.52 usr 0.97 sys + 2095.92 cusr 63.04 csys = 2168.45 CPU)
Result: FAIL
will dig into this this evening...