TextEditTransaction class
Editable text transaction.
Applies a series of edits using original location information, and composes them into the edited string.
Constructors
- TextEditTransaction(String original, SourceFile? file)
- Creates a new transaction.
Properties
Methods
-
commit(
) → NestedPrinter -
Applies all pending edits and returns a NestedPrinter containing the
rewritten string and source map information. file
.location
is given to the underlying printer to indicate the name of the generated file that will contains the source map information. -
edit(
int begin, int end, Object replacement) → void -
Edit the original text, replacing text on the range
begin
andend
with thereplacement
.replacement
can be either a string or a NestedPrinter. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited