Skip to content

Commit

Permalink
don't move the cursor for zerowidth match of \r\n
Browse files Browse the repository at this point in the history
Fixes #120511
  • Loading branch information
timo committed Nov 11, 2013
1 parent f8a27c0 commit 4df65de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vm/parrot/QAST/Compiler.nqp
Expand Up @@ -1379,8 +1379,8 @@ class QAST::Compiler is HLL::Compiler {
if $cclass eq '.CCLASS_NEWLINE' {
$ops.push_pirop('substr', '$S10', %*REG<tgt>, %*REG<pos>, 2);
$ops.push_pirop('iseq', '$I11', '$S10', '"\r\n"');
$ops.push_pirop('add', %*REG<pos>, '$I11');
}
$ops.push_pirop('add', %*REG<pos>, '$I11') unless $node.subtype eq 'zerowidth';
}
}
$ops.push_pirop('add', %*REG<pos>, 1) unless $node.subtype eq 'zerowidth';
$ops;
Expand Down

0 comments on commit 4df65de

Please sign in to comment.