Say I have a synthetic situation: number n says how many symbols x will be after this number. After that, I want to drop all other xs.
For example:
val digit by regexToken("\\d")
val n by literalToken("n")
val found by digit map {it.toInt()}
val result by found and (found times n) and -zeroOrMore(n)
// ^ can't do
Say I have a synthetic situation: number
n
says how many symbolsx
will be after this number. After that, I want to drop all otherx
s.For example: