Return a match if it explains the whole of the input. This style of usage is more like a traditional parser, building an AST for a whole file.
context for the whole parsing operation
listeners observing input characters as they are read
Convenience method to find matches without the ability to update them
context for the whole parsing operation
listeners observing input characters as they are read
Parallel to findMatches, but returns a Promise
Convenient method to find the first match, or null if not found. Stops searching after the first match.
listeners observing input characters as they are read
Generator for matching the given input.
Return a MatchReport. if it is successful, call .toValueStructure
context for the whole parsing operation
listeners observing input characters as they are read
Create a microgrammar with typed properties according to the given interface. If the definitions aren't nested, infer string type
Create a microgrammar with inferred interface taking properties of type "any" from definitions. Use fromDefinitions for stronger typing. If the definitions aren't nested, infer string type
Create a microgrammar with string variables. String is of form "method ${name}(): ${returnType}". Definitions should be provided for each string variable. Use fromDefinitions to achieve nesting or non-string typing. If the definitions aren't nested, infer string type
Create a microgrammar with string variables with automatic typing as in fromDefinitionsAs. String is of form "method ${name}(): ${returnType}". Definitions should be provided for each string variable. Use fromDefinitions to achieve nesting or non-string typing. If the definitions aren't nested, infer string type
Make these matches transparently updatable using property mutation
matches
content the matches are within
Make this match transparently updatable using property mutation
match to make updatable
the match is within
Generated using TypeDoc
Central class for microgrammar usage. Represents a microgrammar that we can use to match input in a string or stream. Modifications are tracked and we can get an updated string afterwards.