reflection library Null safety

This package contains tools to reflect on and transform parsers.


Helper to reflect on properties of a grammar.
Encapsulates a single linter issue.
Encapsulates a single linter rule.


allLinterRules → const List<LinterRule>
All default linter rules to be run.
[UnresolvedSettable(), UnnecessaryResolvable(), RepeatedChoice(), UnreachableChoice(), NullableRepeater(), LeftRecursion(), NestedChoice(), OverlappingChoice(), UnusedResult()]


allParser(Parser root) Iterable<Parser>
Returns a lazy iterable over all parsers reachable from root using a depth-first traversal over the connected parser graph. [...]
linter(Parser parser, {LinterCallback? callback, List<LinterRule>? rules, Set<String> excludedRules = const {}, Set<LinterType> excludedTypes = const {}}) List<LinterIssue>
Returns a list of linter issues found when analyzing the parser graph reachable from parser. [...]
removeDuplicates<T>(Parser<T> parser) Parser<T>
Returns a copy of parser with all duplicates parsers collapsed.
removeSettables<T>(Parser<T> parser) Parser<T>
Returns a copy of parser with all settable parsers removed.
@Deprecated('Use `resolve(Parser)` instead.')
transformParser<T>(Parser<T> parser, TransformationHandler handler) Parser<T>
Transforms all parsers reachable from parser with the given handler. The identity function returns a copy of the the incoming parser. [...]


The type of a linter issue.


LinterCallback = void Function(LinterIssue issue)
Function signature of a linter callback that is called whenever a linter rule identifies an issue.
TransformationHandler = Parser<T> Function<T>(Parser<T> parser)
A function transforming one parser to another one.