|
|
@ -120,6 +120,7 @@ internal sealed class PluralCondition { |
|
|
|
't' -> PluralOperand.T |
|
|
|
't' -> PluralOperand.T |
|
|
|
'v' -> PluralOperand.V |
|
|
|
'v' -> PluralOperand.V |
|
|
|
'w' -> PluralOperand.W |
|
|
|
'w' -> PluralOperand.W |
|
|
|
|
|
|
|
'c', 'e' -> PluralOperand.C |
|
|
|
else -> throw PluralConditionParseException(description) |
|
|
|
else -> throw PluralConditionParseException(description) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -165,14 +166,18 @@ internal sealed class PluralCondition { |
|
|
|
return start..start |
|
|
|
return start..start |
|
|
|
} |
|
|
|
} |
|
|
|
consumeNext() |
|
|
|
consumeNext() |
|
|
|
if (peekNext() != '.') throw PluralConditionParseException(description) |
|
|
|
if (consumeNext() != '.') throw PluralConditionParseException(description) |
|
|
|
val endInclusive = consumeNextInt() |
|
|
|
val endInclusive = consumeNextInt() |
|
|
|
return start..endInclusive |
|
|
|
return start..endInclusive |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun nextCommaOrNull(): Char? { |
|
|
|
fun nextCommaOrNull(): Char? { |
|
|
|
return when (peekNextOrNull()) { |
|
|
|
return when (peekNextOrNull()) { |
|
|
|
',' -> ',' |
|
|
|
',' -> { |
|
|
|
|
|
|
|
consumeNext() |
|
|
|
|
|
|
|
',' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
null -> null |
|
|
|
null -> null |
|
|
|
else -> throw PluralConditionParseException(description) |
|
|
|
else -> throw PluralConditionParseException(description) |
|
|
|
} |
|
|
|
} |
|
|
|