or Default
Optional parsing expression with the default value.
Samples
import io.kpeg.pe.Symbol.Rule
fun main() {
//sampleStart
// a - OK - 'a'
// A - OK - '?'
// b - OK - '?'
char('a') // EvalPE<Char>
.orDefault(value = '?') // EvalPE<Char>
//sampleEnd
}
Sources
JVM source
Link copied to clipboard