Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@masak
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masak/d9bd70d9f196a39d30bb to your computer and use it in GitHub Desktop.
Save masak/d9bd70d9f196a39d30bb to your computer and use it in GitHub Desktop.
Has Grammar::Debugger bitrotted?
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;
$ 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