Skip to content

Commit

Permalink
Place atomic symbol next to target always.
Browse files Browse the repository at this point in the history
Based on feedback from ilmari++ and timotimo++.
  • Loading branch information
jnthn committed Aug 17, 2017
1 parent a45ede9 commit c67d7dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/Grammar.nqp
Expand Up @@ -4245,8 +4245,8 @@ grammar Perl6::Grammar is HLL::Grammar does STD {

token prefix:sym<++> { <sym> <O(|%autoincrement)> }
token prefix:sym<--> { <sym> <O(|%autoincrement)> }
token prefix:sym<βš›++> { <sym> <O(|%autoincrement)> }
token prefix:sym<βš›--> { <sym> <O(|%autoincrement)> }
token prefix:sym<++βš›> { <sym> <O(|%autoincrement)> }
token prefix:sym<--βš›> { <sym> <O(|%autoincrement)> }
token postfix:sym<++> { <sym> <O(|%autoincrement)> }
token postfix:sym<--> { <sym> <O(|%autoincrement)> }
token postfix:sym<βš›++> { <sym> <O(|%autoincrement)> }
Expand Down
4 changes: 2 additions & 2 deletions src/core/atomicops.pm
Expand Up @@ -53,7 +53,7 @@ sub postfix:<βš›++>(atomicint $target is rw --> atomicint) {
nqp::atomicinc_i($target)
}

sub prefix:<βš›++>(atomicint $target is rw --> atomicint) {
sub prefix:<++βš›>(atomicint $target is rw --> atomicint) {
my atomicint $ = nqp::atomicinc_i($target) + 1
}

Expand All @@ -65,7 +65,7 @@ sub postfix:<βš›-->(atomicint $target is rw --> atomicint) {
nqp::atomicdec_i($target)
}

sub prefix:<βš›-->(atomicint $target is rw --> atomicint) {
sub prefix:<--βš›>(atomicint $target is rw --> atomicint) {
my atomicint $ = nqp::atomicdec_i($target) - 1
}

Expand Down

0 comments on commit c67d7dd

Please sign in to comment.