Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active December 20, 2015 09:49
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 FROGGS/6111211 to your computer and use it in GitHub Desktop.
Save FROGGS/6111211 to your computer and use it in GitHub Desktop.
# generate code that runs the block only once
make QAST::Stmts.new(
QAST::Op.new(
:op('if'),
QAST::Op.new( :op('p6stateinit') ),
QAST::Op.new(
:op('p6store'),
QAST::Var.new( :name($sym), :scope('lexical') ),
QAST::Op.new( :op('call'), $<blorst>.ast )
),
QAST::Var.new( :name($sym), :scope('lexical') )
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment