Header menu logo XParsec.ActiveParsers

ActiveParser<'Parsed, 'T, 'State, 'Input> Type

A parser that can be used as a partial active pattern: it returns the parsed value and the cursor after it, or ValueNone when it does not match.

Any function of this shape marked [<return: Struct>] is an active pattern:

 [<return: Struct>]
 let (|Number|_|) cursor = ActiveParser.ofParser pint32 cursor

 match cursor with
 | Number (n, next) -> ...
Multiple items
type StructAttribute = inherit Attribute new: unit -> StructAttribute

--------------------
new: unit -> StructAttribute
val cursor: 'a
active recognizer Number: 'a -> 'b voption
val n: obj
val next: obj

Type something to start searching.