Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
actually, don't try to find \r\n for zerowidth at all.
  • Loading branch information
timo committed Nov 11, 2013
1 parent a015b4a commit 7b9f357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vm/parrot/QAST/Compiler.nqp
Expand Up @@ -1376,10 +1376,10 @@ class QAST::Compiler is HLL::Compiler {
my $testop := $node.negate ?? 'if' !! 'unless';
$ops.push_pirop('is_cclass', '$I11', $cclass, %*REG<tgt>, %*REG<pos>);
$ops.push_pirop($testop, '$I11', %*REG<fail>);
if $cclass eq '.CCLASS_NEWLINE' {
if $cclass eq '.CCLASS_NEWLINE' && $node.subtype ne 'zerowidth' {
$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') unless $node.subtype eq 'zerowidth';
$ops.push_pirop('add', %*REG<pos>, '$I11');
}
}
$ops.push_pirop('add', %*REG<pos>, 1) unless $node.subtype eq 'zerowidth';
Expand Down

0 comments on commit 7b9f357

Please sign in to comment.