Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (21 sloc) 425 Bytes
#! winxed
// Compiling and using nqp code within winxed.
function main()
{
string source = <<:
# nqp code
sub hello($msg) {
say('Hi from nqp, ', $msg);
}
:>>
;
say('Source:');
print(source);
load_bytecode('nqp-rx.pbc');
var nqp = compreg('NQP-rx');
var code= nqp.compile(source);
var hello=code();
say("Executing: \"hello('winxed world');\"");
hello('winxed world');
}
// End
Jump to Line
Something went wrong with that request. Please try again.