[jruby-joni] 162/194: swap -> replaceWith

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:37 UTC 2018


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit c89a22d57efa6a2ca1ea859764fc0ee1386cdd94
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sun Jan 14 20:14:02 2018 +0100

    swap -> replaceWith
---
 src/org/joni/Analyser.java | 10 +++++-----
 src/org/joni/ast/Node.java |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/org/joni/Analyser.java b/src/org/joni/Analyser.java
index 99681fa..8261714 100644
--- a/src/org/joni/Analyser.java
+++ b/src/org/joni/Analyser.java
@@ -1340,7 +1340,7 @@ final class Analyser extends Parser {
         Node head = an.target;
         Node np = ((ListNode)head).value;
 
-        node.swap(head);
+        node.replaceWith(head);
 
         Node tmp = node;
         node = head;
@@ -1409,7 +1409,7 @@ final class Analyser extends Parser {
                             if (y != null && isNotIncluded(x, y)) {
                                 EncloseNode en = new EncloseNode(EncloseType.STOP_BACKTRACK);
                                 en.setStopBtSimpleRepeat();
-                                node.swap(en);
+                                node.replaceWith(en);
                                 en.setTarget(node);
                             }
                         }
@@ -1648,7 +1648,7 @@ final class Analyser extends Parser {
         /* ending */
         Node xnode = topRoot != null ? topRoot : prevNode.p;
 
-        node.swap(xnode);
+        node.replaceWith(xnode);
         return xnode;
     }
 
@@ -1882,10 +1882,10 @@ final class Analyser extends Parser {
                         qn.lower -= i;
                         if (!isRepeatInfinite(qn.upper)) qn.upper -= i;
                         ListNode list = ListNode.newList(str, null);
-                        qn.swap(list);
+                        qn.replaceWith(list);
                         ListNode.listAdd(list, qn);
                     } else {
-                        qn.swap(str);
+                        qn.replaceWith(str);
                     }
                     break;
                 }
diff --git a/src/org/joni/ast/Node.java b/src/org/joni/ast/Node.java
index cbbcff1..d47a05f 100644
--- a/src/org/joni/ast/Node.java
+++ b/src/org/joni/ast/Node.java
@@ -46,7 +46,7 @@ public abstract class Node implements NodeType {
         return null;
     };
 
-    public void swap(Node with) {
+    public void replaceWith(Node with) {
         with.parent = parent;
         parent.setChild(with);
         parent = null;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list