MinimizeWhitespaceVisitor class
Applies whitespace reduction to implement (preserveWhitespace: false
).
Use visitAllRoot to process root nodes:
var nodes = parse(template, sourceUrl: url);
nodes = const MinimizeWhitespaceVisitor().visitAllRoot(nodes);
- Inheritance
-
- Object
- RecursiveTemplateAstVisitor<
bool> - MinimizeWhitespaceVisitor
Constructors
- MinimizeWhitespaceVisitor()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visit<
T extends TemplateAst> (T? astNode, [bool? context]) → T? -
Visits a single TemplateAst node, capturing the type.
inherited
-
visitAll<
T extends TemplateAst> (Iterable< T> ? astNodes, [bool? context]) → List<T> ? -
Visits a collection of TemplateAst nodes, returning all of those that
are not null.
inherited
-
visitAllRoot(
List< StandaloneTemplateAst> rootNodes) → List<StandaloneTemplateAst> -
Returns
rootNodes
, visited, with whitespace removed. -
visitAnnotation(
AnnotationAst astNode, [bool? _]) → TemplateAst -
Visits all annotation ASTs.
inherited
-
visitAttribute(
AttributeAst astNode, [bool? context]) → TemplateAst -
Visits all attribute ASTs.
inherited
-
visitBanana(
BananaAst astNode, [bool? _]) → TemplateAst -
Visits all banana ASTs.
inherited
-
visitCloseElement(
CloseElementAst astNode, [bool? _]) → TemplateAst -
Visits all closeElement ASTS.
inherited
-
visitComment(
CommentAst astNode, [bool? _]) → TemplateAst -
Visits all comment ASTs.
inherited
-
visitContainer(
ContainerAst astNode, [bool? _]) → TemplateAst -
Visits all container ASTs.
override
-
visitElement(
ElementAst astNode, [bool? _]) → TemplateAst -
Visits all element ASTs.
override
-
visitEmbeddedContent(
EmbeddedContentAst astNode, [bool? _]) → TemplateAst -
Visits all embedded content ASTs.
inherited
-
visitEmbeddedTemplate(
EmbeddedTemplateAst astNode, [bool? _]) → TemplateAst -
Visits all embedded template ASTs.
override
-
visitEvent(
EventAst astNode, [bool? context]) → TemplateAst -
Visits all event ASTs.
inherited
-
visitInterpolation(
InterpolationAst astNode, [bool? _]) → TemplateAst -
Visits all interpolation ASTs.
inherited
-
visitLetBinding(
LetBindingAst astNode, [bool? _]) → TemplateAst -
Visits all let-binding ASTs.
inherited
-
visitProperty(
PropertyAst astNode, [bool? _]) → TemplateAst -
Visits all property ASTs.
inherited
-
visitReference(
ReferenceAst astNode, [bool? _]) → TemplateAst -
Visits all reference ASTs.
inherited
-
visitStar(
StarAst astNode, [bool? _]) → TemplateAst -
Visits all star ASTs.
inherited
-
visitText(
TextAst astNode, [bool? _]) → TemplateAst -
Visits all text ASTs.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited