-
-
Save masak/d9bd70d9f196a39d30bb to your computer and use it in GitHub Desktop.
Has Grammar::Debugger bitrotted?
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
my class C is Mu is Metamodel::GrammarHOW { | |
has $!x; | |
method find_method($obj, $name) { | |
return callsame if $name eq any(<parse CREATE BUILD Bool defined MATCH>); | |
-> $c, |args { self.y($name) }; | |
} | |
method y($name) { | |
$!x = 1; | |
} | |
method publish_method_cache($obj) { | |
} | |
} | |
my module EXPORTHOW { } | |
EXPORTHOW::<grammar> = C; |
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
$ PERL6LIB=lib perl6 -e 'use Grammar::Debugger; grammar G { regex TOP { hi } }; G.parse("hi")' | |
TOP | |
> | |
Cannot modify an immutable Bool | |
in block at .../lib/Grammar/Debugger.pm:77 | |
in block at .../lib/Grammar/Debugger.pm:75 | |
in method intervene at .../lib/Grammar/Debugger.pm:70 | |
in block at .../lib/Grammar/Debugger.pm:45 | |
in method parse at src/gen/m-CORE.setting:13041 | |
in block at -e:1 | |
Underlying error: | |
$ PERL6LIB=lib perl6 -e 'use Grammar::Debugger; grammar G { regex TOP { hi } }; G.parse("hi")' | |
No such method 'TOP' for invocant of type 'Bool' | |
in method parse at src/gen/m-CORE.setting:13239 | |
in block at -e:1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment