Skip to content

Commit

Permalink
Add an nqp::flushfh op on Parrot.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 3, 2013
1 parent 755bd8b commit 1eb7d09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vm/parrot/QAST/Operations.nqp
Expand Up @@ -1628,6 +1628,15 @@ QAST::Operations.add_core_op('sayfh', -> $qastcomp, $op {
$op[0], $op[1]
))
});
QAST::Operations.add_core_op('flushfh', -> $qastcomp, $op {
if +$op.list != 1 {
nqp::die("The 'flushfh' op expects two operands");
}
$qastcomp.as_post(QAST::Op.new(
:op('callmethod'), :name('flush'),
$op[0]
))
});
QAST::Operations.add_core_op('readlinefh', -> $qastcomp, $op {
if +$op.list != 1 {
nqp::die("The 'readlinefh' op expects one operand");
Expand Down

0 comments on commit 1eb7d09

Please sign in to comment.