e6f4d6e6fa
^KT-65406
41 lines
1.1 KiB
Kotlin
Vendored
41 lines
1.1 KiB
Kotlin
Vendored
fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) {
|
|
var ch: Char? = <this>.nextChar()
|
|
while (when {
|
|
EQEQ(arg0 = ch, arg1 = null).not() -> EQEQ(arg0 = ch, arg1 = quote).not()
|
|
else -> false
|
|
}) { // BLOCK
|
|
when {
|
|
EQEQ(arg0 = ch, arg1 = <get-BACKSLASH>()) -> { // BLOCK
|
|
val tmp_0: Char? = <this>.nextChar()
|
|
when {
|
|
EQEQ(arg0 = tmp_0, arg1 = null) -> null
|
|
else -> tmp_0.let<Char, @FlexibleNullability StringBuilder?>(block = local fun <anonymous>(it: Char): @FlexibleNullability StringBuilder? {
|
|
return sb.append(p0 = it)
|
|
}
|
|
)
|
|
}
|
|
} /*~> Unit */
|
|
else -> sb.append(p0 = ch) /*~> Unit */
|
|
}
|
|
ch = <this>.nextChar()
|
|
}
|
|
}
|
|
|
|
private fun Reader.nextChar(): Char? {
|
|
return { // BLOCK
|
|
val tmp_1: Int? = <this>.read().takeUnless<Int>(predicate = local fun <anonymous>(it: Int): Boolean {
|
|
return EQEQ(arg0 = it, arg1 = -1)
|
|
}
|
|
)
|
|
when {
|
|
EQEQ(arg0 = tmp_1, arg1 = null) -> null
|
|
else -> tmp_1.toChar()
|
|
}
|
|
}
|
|
}
|
|
|
|
private const val BACKSLASH: Char
|
|
field = '\\'
|
|
private get
|
|
|