OptionalBranchBuilder
Builder class for an optional expectation.
Properties
Used with storeIn
, allows placing some state as the item of the output list.
Functions
Build this expected optional
Build an "either" construct, with different branches the parsing process can take.
Adds an expectation that always succeeds and emits the provided value.
Adds an expectation to this node descriptor based on a node
Adds an expectation to this node descriptor based on a token type.
Expect the end-of-file to be reached at this point.
Create a lookahead expectation.
Create an optional branch. If the optional branch matches, what it stores will is passed transparently, just like if the optional { }
was not there. If the optional branch does not match, nothing happens, just like if the entire optional branch was not there.
Add a buildable expectation to this receiver -- the exact meaning of this depends on the implementation
Add an expectation directly instead of a builder. This is a shortcut for this += Buildable.of(expectation)
Repeatedly runs the provided expectations without storing anything.
Used with storeIn self()
, provides the actual value of a node declaration that is implemented with by subtype()
Concise notation for the expect function.