addSpan method
Adds an entry mapping target
to source
.
If isIdentifier
is true or if target
is a SourceMapSpan with
isIdentifier
set to true, this entry is considered to represent an
identifier whose value will be stored in the source map. isIdentifier
takes precedence over target
's isIdentifier
value.
Implementation
void addSpan(SourceSpan source, SourceSpan target, {bool? isIdentifier}) {
isIdentifier ??= source is SourceMapSpan ? source.isIdentifier : false;
var name = isIdentifier ? source.text : null;
_entries.add(Entry(source.start, target.start, name));
}