[jruby-joni] 75/194: sync with Onigmo changes

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:29 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 137e66b13fbc5664703a1cff06ad3ca9dee9feba
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sat Dec 30 23:18:12 2017 +0100

    sync with Onigmo changes
---
 src/org/joni/Analyser.java | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/src/org/joni/Analyser.java b/src/org/joni/Analyser.java
index e2f36dd..4e5c463 100644
--- a/src/org/joni/Analyser.java
+++ b/src/org/joni/Analyser.java
@@ -219,13 +219,7 @@ final class Analyser extends Parser {
 
     private void noNameDisableMapFor_anchor(Node node, int[]map, Ptr counter) {
         AnchorNode an = (AnchorNode)node;
-        switch (an.type) {
-            case AnchorType.PREC_READ:
-            case AnchorType.PREC_READ_NOT:
-            case AnchorType.LOOK_BEHIND:
-            case AnchorType.LOOK_BEHIND_NOT:
-                an.setTarget(noNameDisableMap(an.target, map, counter));
-        }
+        if (an.target != null) an.setTarget(noNameDisableMap(an.target, map, counter));
     }
 
     private Node noNameDisableMap(Node node, int[]map, Ptr counter) {
@@ -275,13 +269,8 @@ final class Analyser extends Parser {
 
         case NodeType.ANCHOR:
             AnchorNode an = (AnchorNode)node;
-            switch (an.type) {
-            case AnchorType.PREC_READ:
-            case AnchorType.PREC_READ_NOT:
-            case AnchorType.LOOK_BEHIND:
-            case AnchorType.LOOK_BEHIND_NOT:
-                renumberByMap(an.target, map);
-            }
+            if (an.target != null) renumberByMap(an.target, map);
+            break;
         } // switch
     }
 
@@ -307,6 +296,11 @@ final class Analyser extends Parser {
             BackRefNode br = (BackRefNode)node;
             if (!br.isNameRef()) newValueException(ERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED);
             break;
+
+        case NodeType.ANCHOR:
+            AnchorNode an = (AnchorNode)node;
+            if (an.target != null) numberedRefCheck(an.target);
+            break;
         } // switch
     }
 

-- 
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