[jruby-joni] 85/194: cleanup
Hideki Yamane
henrich at moszumanska.debian.org
Thu Feb 1 12:04:30 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 eb2cb7447018f968ffff411c99cc4cea47af14aa
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Mon Jan 1 22:59:54 2018 +0100
cleanup
---
src/org/joni/ast/QuantifierNode.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/org/joni/ast/QuantifierNode.java b/src/org/joni/ast/QuantifierNode.java
index f6c2c7b..3074c74 100644
--- a/src/org/joni/ast/QuantifierNode.java
+++ b/src/org/joni/ast/QuantifierNode.java
@@ -25,6 +25,7 @@ import org.joni.constants.Reduce;
import org.joni.constants.TargetInfo;
public final class QuantifierNode extends StateNode {
+ public static final int REPEAT_INFINITE = -1;
public Node target;
public int lower;
public int upper;
@@ -119,16 +120,14 @@ public final class QuantifierNode extends StateNode {
return -1;
}
- protected void set(QuantifierNode other) {
+ protected void copy(QuantifierNode other) {
+ state = other.state;
setTarget(other.target);
other.target = null;
lower = other.lower;
upper = other.upper;
greedy = other.greedy;
targetEmptyInfo = other.targetEmptyInfo;
-
- //setHeadExact(other.headExact);
- //setNextHeadExact(other.nextHeadExact);
headExact = other.headExact;
nextHeadExact = other.nextHeadExact;
isRefered = other.isRefered;
@@ -144,8 +143,7 @@ public final class QuantifierNode extends StateNode {
switch(Reduce.REDUCE_TABLE[cnum][pnum]) {
case DEL:
// no need to set the parent here...
- // swap ?
- set(other); // *pnode = *cnode; ???
+ copy(other);
break;
case A:
@@ -267,9 +265,7 @@ public final class QuantifierNode extends StateNode {
return 0;
}
- public static final int REPEAT_INFINITE = -1;
public static boolean isRepeatInfinite(int n) {
return n == REPEAT_INFINITE;
}
-
}
--
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