Skip to content

Commit

Permalink
fix S///
Browse files Browse the repository at this point in the history
  • Loading branch information
diakopter committed Oct 22, 2015
1 parent 0e26a47 commit 75e92fc
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/Perl6/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -7001,20 +7001,16 @@ Compilation unit '$file' contained the following violations:
)
),

($<sym> eq 's' ??
# $_ = $_!APPLY-MATCHES()
QAST::Op.new( :op('call'), :name('&infix:<=>'),
QAST::Var.new( :name('$_'), :scope('lexical') ),
$apply_matches
) !!
# $_!APPLY-MATCHES()
QAST::Op.new( :op('call'), :name('&infix:<=>'),
QAST::Var.new( :name($<sym> eq 's' ?? '$_' !! '$/'), :scope('lexical') ),
$apply_matches
)

),

# It will return a list of matches when we match globally, and a single
# match otherwise.
(
$<sym> eq 's' ?? (
$global ??
QAST::Op.new( :op('p6store'),
QAST::Var.new( :name('$/'), :scope('lexical') ),
Expand Down Expand Up @@ -7043,13 +7039,11 @@ Compilation unit '$file' contained the following violations:
QAST::Var.new( :name('$/'), :scope('lexical') ) ),
QAST::Var.new( :name($result), :scope('local') )
)
),
) !! QAST::Stmt.new(),

# The result of this operation.
QAST::Var.new( :name('$/'), :scope('lexical') )
),
$result,
$global_result,
);
}

Expand Down

0 comments on commit 75e92fc

Please sign in to comment.