File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
fluent.syntax/src/main/kotlin/org/projectfluent/syntax/processor Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ package org.projectfluent.syntax.processor
3
3
import org.projectfluent.syntax.ast.* // ktlint-disable no-wildcard-imports
4
4
import java.lang.Exception
5
5
6
- private val special =
7
- """ \\(([\\"])|(u[0-9a-fA-F]{4}))""" .toRegex()
8
-
9
6
/* *
10
7
* Process patterns by returning new patterns with elements transformed.
11
8
*/
@@ -162,16 +159,15 @@ class Processor {
162
159
}
163
160
}
164
161
162
+ private val special =
163
+ """ \\(([\\"])|(u[0-9a-fA-F]{4}))""" .toRegex()
164
+
165
165
private fun unescape (matchResult : MatchResult ): CharSequence {
166
166
val matches = matchResult.groupValues.drop(2 ).listIterator()
167
167
val simple = matches.next()
168
168
if (simple != " " ) { return simple }
169
169
val uni4 = matches.next()
170
170
if (uni4 != " " ) {
171
- val a = uni4.substring(1 ).toInt(16 )
172
- val b = a.toChar()
173
- val c = b.toString()
174
- val d = a.toString()
175
171
return uni4.substring(1 ).toInt(16 ).toChar().toString()
176
172
}
177
173
throw Exception (" Unexpected" )
You can’t perform that action at this time.
0 commit comments