]> git.eshelyaron.com Git - sweep.git/commitdiff
; Fix precedence calculation for unary operator arguments
authorEshel Yaron <me@eshelyaron.com>
Sat, 7 Oct 2023 12:24:30 +0000 (14:24 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Oct 2023 12:24:30 +0000 (14:24 +0200)
sweep.pl

index abe7cfe4601be285d9b1f612ba3d8db90d9d7f02..c14f6bc5d99ee6e4cbe0e5f765d0a60ae08f7b47 100644 (file)
--- a/sweep.pl
+++ b/sweep.pl
@@ -1315,8 +1315,8 @@ sweep_replace_term_r(term_position(From, To, _, _, ArgsPos), Term, FileName, Mod
             (   xref_op(FileName, op(Precedence0, Assoc, Functor))
             ;   current_op(Precedence0, Assoc, Functor)
             ),
-            memberchk(Assoc, [fx,fy])
-        ->  (   Assoc == fx
+            memberchk(Assoc, [xf,yf])
+        ->  (   Assoc == xf
             ->  Precedence is Precedence0 - 1
             ;   Precedence = Precedence0
             )
@@ -1324,8 +1324,8 @@ sweep_replace_term_r(term_position(From, To, _, _, ArgsPos), Term, FileName, Mod
             (   xref_op(FileName, op(Precedence0, Assoc, Functor))
             ;   current_op(Precedence0, Assoc, Functor)
             ),
-            memberchk(Assoc, [xf,yf])
-        ->  (   Assoc == xf
+            memberchk(Assoc, [fx,fy])
+        ->  (   Assoc == fx
             ->  Precedence is Precedence0 - 1
             ;   Precedence = Precedence0
             )