File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed
core/common/src/internal/format/parser Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ internal class ParserStructure<in Output>(
4646 * Simplifies the result by merging number spans and handling unconditional modifications.
4747 */
4848internal fun <T > List<ParserStructure<T>>.concat (): ParserStructure <T > {
49- // Invariant: only called when simplifiedParserStructure.operations is non-empty
5049 fun mergeOperations (
5150 baseOperations : List <ParserOperation <T >>,
5251 numberSpan : List <NumberConsumer <T >>? ,
@@ -116,7 +115,6 @@ internal fun <T> List<ParserStructure<T>>.concat(): ParserStructure<T> {
116115 listOf (simplified)
117116 }.ifEmpty {
118117 if (other.operations.isNotEmpty()) {
119- // The invariant is preserved: other.operations is non-empty
120118 return mergeOperations(newOperations, currentNumberSpan, unconditionalModifications, other)
121119 }
122120 // [other] has no operations, just alternatives; use them as our tails
@@ -132,7 +130,6 @@ internal fun <T> List<ParserStructure<T>>.concat(): ParserStructure<T> {
132130 ParserStructure (newOperations, mergedTails)
133131 } else {
134132 // Distribute number span across alternatives that start with number spans
135- // The invariant is preserved: the structure coming from the recursive [simplifyAndAppend] calls
136133 val newTails = mergedTails.map { structure ->
137134 mergeOperations(emptyList(), currentNumberSpan, unconditionalModifications, structure)
138135 }
You can’t perform that action at this time.
0 commit comments