PrettyElement class

A PrettyElement is a PrettyNode has a children attribute.

Implemented types

Constructors

PrettyElement(String type, {required List<PrettyNode> children, required List<PrettyMarker> markers, required Map<String, String> attributes, required SourceLocation start, required SourceLocation end, required bool isBlock, required SiblingPosition position})

Properties

attributes Map<String, String>
final
children List<PrettyNode>
final
end → SourceLocation
The end location of this node.
final
hashCode int
The hash code for this object.
no setterinherited
isBlock bool
final
isFirstChild bool
If this is the first child.
no setter
isLastChild bool
If this is the last child.
no setter
lineEndings List<PrettyLineEnding>
final
markers List<PrettyMarker>
final
position SiblingPosition
The position of this node in it's siblings.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start → SourceLocation
The start location of this node.
final
type String
final

Methods

accept(PrettyNodeVisitor visitor) → void
override
getDescendants([bool withMarkers = false]) List<PrettyNode>
The children and their children.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startLocations() List<SourceLocation>
Returns all start locations of the descendants of this node.
toMap({bool showNull = false, bool showEmpty = false, bool showRuntimeType = false}) Map<String, dynamic>
Outputs the attributes as a Map.
override
toString() String
A string representation of this object.
inherited
writeln([bool append = true]) → void
Adds a line ending to this node.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited