inserter library
Additional tooling for mason_cli to write to existing files.
Classes
- Inserter
-
Tooling for inserting
StringintoFiles given their respective strategies. - InserterBase
- Core inserter interface for implementing specialized line readers.
- MatcherBuilder
- Describes the context of when a line is matched and how to build the line need for the Inserter calling it.
Enums
- BuilderStrategy
- Strategy used by a MatcherBuilder to determine where the results of a LineBuilder should go.
Functions
Typedefs
-
LineBuilder
= Future<
String> Function(File file, String line) - Callback for writing generating a line(s) of code with the given context of the pattern and full line that was matched.
-
LineConverter
= Stream<
String> Function(File file) - How the given file's contents are read.
-
Matcher
= Future<
bool> Function(File file, String line) - Callback used when evaluating whether a line is matched
-
StopWhen
= Future<
bool> Function(File file, String line, int totalMatches) - Evaluated after MatcherBuilder.matcher and MatcherBuilder.builder are executed.