Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created April 29, 2012 16:30
Show Gist options
  • Save jnthn/2551710 to your computer and use it in GitHub Desktop.
Save jnthn/2551710 to your computer and use it in GitHub Desktop.
use QRegex;
sub qast_to_pir($qast) {
my $post := QAST::Compiler.as_post($qast);
my $pir := QAST::Compiler.pir($post);
say($pir);
}
qast_to_pir(QAST::Block.new(
QAST::Op.new(
:op('unless'),
QAST::IVal.new(:value(0)),
QAST::IVal.new(:value(2))
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment