-
-
Save timo/20f6731d7f67e82f4f55 to your computer and use it in GitHub Desktop.
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
sub make_ref_type($name, $kind) { | |
my $class := nqp::newtype(NQPMu, 'NativeRef'); | |
my $info := nqp::hash(); | |
$info<nativeref> := nqp::hash(); | |
$info<nativeref><type> := $kind; | |
$info<nativeref><refkind> := 'lexical'; | |
nqp::composetype($class, $info); | |
return $class; | |
} | |
my $hllconfig := nqp::hash(); | |
$hllconfig<int_lex_ref> := make_ref_type('StubIntLexRef', int); | |
$hllconfig<num_lex_ref> := make_ref_type('StubNumLexRef', num); | |
$hllconfig<str_lex_ref> := make_ref_type('StubStrLexRef', str); | |
nqp::sethllconfig('nqp', $hllconfig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment