Skip to content

reuse parser result in other delegate #49

@asm0dey

Description

@asm0dey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions