@@ -23,19 +23,19 @@ public sealed interface FormatBuilder {
23
23
/* *
24
24
* Appends a format along with other ways to parse the same portion of the value.
25
25
*
26
- * When parsing, the first, [mainFormat ] is used to parse the value, and if parsing fails using that, the formats
27
- * from [otherFormats ] are tried in order.
26
+ * When parsing, the first, [primaryFormat ] is used to parse the value, and if parsing fails using that, the formats
27
+ * from [alternativeFormats ] are tried in order.
28
28
*
29
- * When formatting, the [mainFormat ] is used to format the value.
29
+ * When formatting, the [primaryFormat ] is used to format the value.
30
30
*/
31
31
@Suppress(" UNCHECKED_CAST" )
32
32
public fun <T : FormatBuilder > T.alternativeParsing (
33
- vararg otherFormats : T .() -> Unit ,
34
- mainFormat : T .() -> Unit
33
+ vararg alternativeFormats : T .() -> Unit ,
34
+ primaryFormat : T .() -> Unit
35
35
): Unit = when (this ) {
36
36
is AbstractFormatBuilder <* , * > ->
37
- appendAlternativeParsingImpl(* otherFormats as Array <out AbstractFormatBuilder <* , * >.() -> Unit > ,
38
- mainFormat = mainFormat as (AbstractFormatBuilder <* , * >.() -> Unit ))
37
+ appendAlternativeParsingImpl(* alternativeFormats as Array <out AbstractFormatBuilder <* , * >.() -> Unit > ,
38
+ mainFormat = primaryFormat as (AbstractFormatBuilder <* , * >.() -> Unit ))
39
39
else -> throw IllegalStateException (" impossible" )
40
40
}
41
41
0 commit comments