IndentingWriter class

A buffer for writing indented source code.

Constructors

IndentingWriter({String filename })

Properties

sourceLocationInfo → GeneratedCodeInfo
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addAnnotatedBlock(String start, String end, List<NamedLocation> namedLocations, void body(), { dynamic endWithNewline: true }) → void
addAnnotation(List<int> fieldPath, String name, int start) → void
Creates an annotation, given the starting offset and ending offset. start should be the location of the identifier as it appears in the string that was passed to the previous print. Name should be the string that was written to file.
addBlock(String start, String end, void body(), { dynamic endWithNewline: true }) → void
Prints a block of text with the body indented one more level.
addUnindentedBlock(String start, String end, void body(), { dynamic endWithNewline: true }) → void
Prints a block of text with an unindented body. (For example, for triple quotes.)
print(String text) → void
Appends a string indented to the current level. (Indentation will be added after newline characters where needed.)
printAnnotated(String text, List<NamedLocation> namedLocations) → void
println([String text = '' ]) → void
Same as print, but with a newline at the end.
printlnAnnotated(String text, List<NamedLocation> namedLocations) → void
toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited