Scope class
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
Properties
- counter ↔ int
-
An arbitrary counter.
getter/setter pair
- generationOptions → GenerationOptions
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → MoorOptions
-
no setter
- parent → Scope?
-
finalinherited
- required → String
-
Available on Scope, provided by the ScopeUtils extension
no setter - root → Scope
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → DartScope
-
final
- writer → Writer
-
final
Methods
-
child(
) → Scope -
findScopeOfLevel(
DartScope level) → Scope -
leaf(
) → StringBuffer -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullableType(
String withoutSuffix) → String -
Available on Scope, provided by the ScopeUtils extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited