All Downloads are FREE. Search and download functionalities are using the official Maven repository.

parser4k.util-generated.kt Maven / Gradle / Ivy

@file:Suppress("unused")

package parser4k

import dev.forkhandles.tuples.Tuple2
import dev.forkhandles.tuples.Tuple3
import dev.forkhandles.tuples.Tuple4
import dev.forkhandles.tuples.Tuple5
import dev.forkhandles.tuples.Tuple6
import dev.forkhandles.tuples.Tuple7
import dev.forkhandles.tuples.Tuple8
import dev.forkhandles.tuples.val1
import dev.forkhandles.tuples.val2
import dev.forkhandles.tuples.val3

/////////////////////////////////////////////////////
// This file was generated by generate-source-code.kt
/////////////////////////////////////////////////////

fun  InOrder2<*, T2>.skipFirst(): Parser = map { (_, it2) -> it2 }
fun  InOrder3<*, T2, T3>.skipFirst(): Parser> = map { (_, it2, it3) -> Tuple2(it2, it3) }
fun  InOrder4<*, T2, T3, T4>.skipFirst(): Parser> = map { (_, it2, it3, it4) -> Tuple3(it2, it3, it4) }
fun  InOrder5<*, T2, T3, T4, T5>.skipFirst(): Parser> = map { (_, it2, it3, it4, it5) -> Tuple4(it2, it3, it4, it5) }
fun  InOrder6<*, T2, T3, T4, T5, T6>.skipFirst(): Parser> = map { (_, it2, it3, it4, it5, it6) -> Tuple5(it2, it3, it4, it5, it6) }
fun  InOrder7<*, T2, T3, T4, T5, T6, T7>.skipFirst(): Parser> = map { (_, it2, it3, it4, it5, it6, it7) -> Tuple6(it2, it3, it4, it5, it6, it7) }
fun  InOrder8<*, T2, T3, T4, T5, T6, T7, T8>.skipFirst(): Parser> = map { (_, it2, it3, it4, it5, it6, it7, it8) -> Tuple7(it2, it3, it4, it5, it6, it7, it8) }

fun  InOrder2.skipLast(): Parser = map { (it1, _) -> it1 }
fun  InOrder3.skipLast(): Parser> = map { (it1, it2, _) -> Tuple2(it1, it2) }
fun  InOrder4.skipLast(): Parser> = map { (it1, it2, it3, _) -> Tuple3(it1, it2, it3) }
fun  InOrder5.skipLast(): Parser> = map { (it1, it2, it3, it4, _) -> Tuple4(it1, it2, it3, it4) }
fun  InOrder6.skipLast(): Parser> = map { (it1, it2, it3, it4, it5, _) -> Tuple5(it1, it2, it3, it4, it5) }
fun  InOrder7.skipLast(): Parser> = map { (it1, it2, it3, it4, it5, it6, _) -> Tuple6(it1, it2, it3, it4, it5, it6) }
fun  InOrder8.skipLast(): Parser> = map { (it1, it2, it3, it4, it5, it6, it7, _) -> Tuple7(it1, it2, it3, it4, it5, it6, it7) }

fun  InOrder3<*, T2, *>.skipWrapper(): Parser = map { (_, it2, _) -> it2 }
fun  InOrder4<*, T2, T3, *>.skipWrapper(): Parser> = map { (_, it2, it3, _) -> Tuple2(it2, it3) }
fun  InOrder5<*, T2, T3, T4, *>.skipWrapper(): Parser> = map { (_, it2, it3, it4, _) -> Tuple3(it2, it3, it4) }
fun  InOrder6<*, T2, T3, T4, T5, *>.skipWrapper(): Parser> = map { (_, it2, it3, it4, it5, _) -> Tuple4(it2, it3, it4, it5) }
fun  InOrder7<*, T2, T3, T4, T5, T6, *>.skipWrapper(): Parser> = map { (_, it2, it3, it4, it5, it6, _) -> Tuple5(it2, it3, it4, it5, it6) }
fun  InOrder8<*, T2, T3, T4, T5, T6, T7, *>.skipWrapper(): Parser> = map { (_, it2, it3, it4, it5, it6, it7, _) -> Tuple6(it2, it3, it4, it5, it6, it7) }

fun  Tuple2.joinToString(): String = val1.toString() + val2
fun  Tuple3.joinToString(): String = val1.toString() + val2 + val3
fun  Tuple4.joinToString(): String = val1.toString() + val2 + val3 + val4
fun  Tuple5.joinToString(): String = val1.toString() + val2 + val3 + val4 + val5
fun  Tuple6.joinToString(): String = val1.toString() + val2 + val3 + val4 + val5 + val6
fun  Tuple7.joinToString(): String = val1.toString() + val2 + val3 + val4 + val5 + val6 + val7
fun  Tuple8.joinToString(): String = val1.toString() + val2 + val3 + val4 + val5 + val6 + val7 + val8





© 2015 - 2024 Weber Informatics LLC | Privacy Policy