ScopeStack class final

An immutable stack of scope names, innermost last, for example source.dart > string.interpolated.single.dart.

Stacks share their parents, so pushing is cheap. Tokens keep a reference to the stack instead of copying it.

Constructors

ScopeStack.root(String scope)
A stack holding the single root scope.

Properties

depth → int
How many scopes the stack holds.
final
hashCode → int
The hash code for this object.
no setteroverride
parent → ScopeStack?
The stack without its innermost scope, or null at the root.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → String
The innermost scope name.
final
scopes → List<String>
Scope names from outermost to innermost.
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push(String? scopePath) → ScopeStack
Pushes scopePath. Space-separated paths push one scope per segment, as in vscode-textmate. A null or empty path returns this stack.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override