[jruby-joni] 25/31: refactor to make ascii word opcodes more consistent
Hideki Yamane
henrich at moszumanska.debian.org
Sat Feb 24 10:44:59 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 6b8564640b97b92c012f70cf399e3bfeb341c037
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Fri Feb 2 23:36:32 2018 +0100
refactor to make ascii word opcodes more consistent
---
src/org/joni/ArrayCompiler.java | 4 ++--
src/org/joni/ByteCodeMachine.java | 8 ++++----
src/org/joni/constants/OPCode.java | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/org/joni/ArrayCompiler.java b/src/org/joni/ArrayCompiler.java
index 736d68c..00af9b7 100644
--- a/src/org/joni/ArrayCompiler.java
+++ b/src/org/joni/ArrayCompiler.java
@@ -323,7 +323,7 @@ final class ArrayCompiler extends Compiler {
case CharacterType.WORD:
if (cn.not) {
if (cn.asciiRange) {
- op = OPCode.NOT_ASCII_WORD;
+ op = OPCode.ASCII_NOT_WORD;
} else {
op = OPCode.NOT_WORD;
}
@@ -1058,7 +1058,7 @@ final class ArrayCompiler extends Compiler {
case AnchorType.NOT_WORD_BOUND:
if (node.asciiRange) {
- addOpcode(OPCode.NOT_ASCII_WORD_BOUND);
+ addOpcode(OPCode.ASCII_NOT_WORD_BOUND);
} else {
addOpcode(OPCode.NOT_WORD_BOUND);
}
diff --git a/src/org/joni/ByteCodeMachine.java b/src/org/joni/ByteCodeMachine.java
index 85d9916..9e74e0a 100644
--- a/src/org/joni/ByteCodeMachine.java
+++ b/src/org/joni/ByteCodeMachine.java
@@ -241,9 +241,9 @@ class ByteCodeMachine extends StackMachine {
case OPCode.WORD_END: opWordEnd(); continue;
case OPCode.ASCII_WORD: opAsciiWord(); break;
- case OPCode.NOT_ASCII_WORD: opNotAsciiWord(); break;
+ case OPCode.ASCII_NOT_WORD: opNotAsciiWord(); break;
case OPCode.ASCII_WORD_BOUND: opAsciiWordBound(); break;
- case OPCode.NOT_ASCII_WORD_BOUND: opNotAsciiWordBound(); continue;
+ case OPCode.ASCII_NOT_WORD_BOUND: opNotAsciiWordBound(); continue;
case OPCode.ASCII_WORD_BEGIN: opAsciiWordBegin(); continue;
case OPCode.ASCII_WORD_END: opAsciiWordEnd(); continue;
@@ -376,9 +376,9 @@ class ByteCodeMachine extends StackMachine {
case OPCode.WORD_END: opWordEndSb(); continue;
case OPCode.ASCII_WORD: opAsciiWord(); break;
- case OPCode.NOT_ASCII_WORD: opNotAsciiWord(); break;
+ case OPCode.ASCII_NOT_WORD: opNotAsciiWord(); break;
case OPCode.ASCII_WORD_BOUND: opAsciiWordBound(); break;
- case OPCode.NOT_ASCII_WORD_BOUND: opNotAsciiWordBound(); continue;
+ case OPCode.ASCII_NOT_WORD_BOUND: opNotAsciiWordBound(); continue;
case OPCode.ASCII_WORD_BEGIN: opAsciiWordBegin(); continue;
case OPCode.ASCII_WORD_END: opAsciiWordEnd(); continue;
diff --git a/src/org/joni/constants/OPCode.java b/src/org/joni/constants/OPCode.java
index 3e95aad..e4bf93c 100644
--- a/src/org/joni/constants/OPCode.java
+++ b/src/org/joni/constants/OPCode.java
@@ -63,9 +63,9 @@ public interface OPCode {
final int WORD_END = 33;
final int ASCII_WORD = 34;
- final int NOT_ASCII_WORD = 35;
+ final int ASCII_NOT_WORD = 35;
final int ASCII_WORD_BOUND = 36;
- final int NOT_ASCII_WORD_BOUND = 37;
+ final int ASCII_NOT_WORD_BOUND = 37;
final int ASCII_WORD_BEGIN = 38;
final int ASCII_WORD_END = 39;
--
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