[jruby-joni] 100/194: fix code point
Hideki Yamane
henrich at moszumanska.debian.org
Thu Feb 1 12:04:31 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 417c6d87c7877d25c95f44a875aedbac03909355
Author: Marcin.Mielzynski <marcin.mielzynski at asseco.pl>
Date: Thu Jan 4 13:59:08 2018 +0100
fix code point
---
src/org/joni/Parser.java | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/org/joni/Parser.java b/src/org/joni/Parser.java
index 02d6bd0..56ae0ed 100644
--- a/src/org/joni/Parser.java
+++ b/src/org/joni/Parser.java
@@ -1263,12 +1263,16 @@ class Parser extends Lexer {
private Node parseStringLoop(StringNode node, boolean group) {
while (true) {
fetchToken();
- if (token.type != TokenType.STRING) break;
-
- if (token.backP == node.end) {
- node.end = p; // non escaped character, remain shared, just increase shared range
+ if (token.type == TokenType.STRING) {
+ if (token.backP == node.end) {
+ node.end = p; // non escaped character, remain shared, just increase shared range
+ } else {
+ node.cat(bytes, token.backP, p); // non continuous string stream, need to COW
+ }
+ } else if (token.type == TokenType.CODE_POINT) {
+ node.catCode(token.getCode(), enc);
} else {
- node.cat(bytes, token.backP, p); // non continuous string stream, need to COW
+ break;
}
}
// targetp = node;
@@ -1410,7 +1414,6 @@ class Parser extends Lexer {
private Node parseCodePoint() {
byte[]buf = new byte[Config.ENC_CODE_TO_MBC_MAXLEN];
int num = enc.codeToMbc(token.getCode(), buf, 0);
- // #ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG ... // setRaw() #else // ???
return new StringNode(buf, 0, num);
}
--
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