Scope class Null safety

A single lexical scope that is a part of a Writer.

The reason we use scopes to write generated code is that some implementation methods might need to introduce additional classes when written. When we can create a new text leaf of the root node, this can be done very easily. When we just pass a single StringBuffer around, this is annoying to manage.

Available Extensions

Constructors

Scope({required Scope? parent, Writer? writer})

Properties

counter int
An arbitrary counter.
read / write
generationOptions GenerationOptions
read-only
hashCode int
The hash code for this object.
read-only, inherited
options → MoorOptions
read-only
parent Scope?
final, inherited
root Scope
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scope DartScope
final
writer Writer
final

Methods

child() Scope
findScopeOfLevel(DartScope level) Scope
leaf() StringBuffer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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