mapPe

fun <T, R> EvalPE<T>.mapPe(transform: MapBuilderBlock<T, R>): EvalPE<R>

Map parsing expression using the transform lambda.

Samples

import io.kpeg.pe.Symbol.Rule
fun main() { 
   //sampleStart 
   DIGIT                          // EvalPE<Char>
    .mapPe { it.digitToInt() } // EvalPE<Int> 
   //sampleEnd
}

Sources

JVM source
Link copied to clipboard