BranchActionParser

open class BranchActionParser<A : Action>(children: Iterable<ActionParser<A>>, default: ActionParser<A>) : ActionParser<A>

Parser to parse path branch

Parameters

children

Children to pass parsing. First non-null result is used as a return value from parse

default

Called when no child parser matches given components

Constructors

Link copied to clipboard
fun <A : Action> BranchActionParser(vararg children: ActionParser<A>)

Constructor with no default action

Link copied to clipboard
fun <A : Action> BranchActionParser(children: Iterable<ActionParser<A>>, default: ActionParser<A>)

Functions

Link copied to clipboard
open override fun parse(components: PshComponents, pathIndex: Int): A?

Handles parsing to registered children Parser increments pathIndex for children as it counts current index as its own