SVariableDeclaration class
- Inheritance
-
- Mixed-in types
-
Properties
-
declSlot
↔ int?
-
S3 (perf plan_3 §4.6): this declaration's slot index within its
enclosing block frame's
_slots array, assigned by StaticResolver when
the variable is slot-eligible (every occurrence is a depth-0, non-escaped,
non-assignment access). null = ineligible → the variable lives in
_values and is accessed by name (status quo). Mutable because the
resolver assigns it on block exit; the index is consulted by both the
runtime define (writing the slot) and the resolved use's resolvedSlot
(reading it), so they address the same cell by construction. Emitted into
toJson only when non-null (backward compatible).
getter/setter pair
-
end
→ int
-
Get the end offset
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
initializer
→ SExpression?
-
Initializer expression
final
-
isConst
→ bool
-
Whether declared with
const
final
-
isFinal
→ bool
-
Whether declared with
final
final
-
isLate
→ bool
-
Whether declared with
late
final
-
length
→ int
-
Length of the source text
final
-
metadata
→ List<SAnnotation>
-
Documentation comment, if any.
final
-
name
→ SSimpleIdentifier?
-
final
-
nodeType
→ String
-
Unique node type identifier for serialization
no setteroverride
-
offset
→ int
-
Source offset of the node
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accept<T>(SAstVisitor<T> visitor)
→ T?
-
Accept a visitor and return the result.
override
-
equals(Object other, [List<String>? log])
→ bool
-
Compares this node with
other. If log is provided, differences
are appended in a human-readable format with JSON-style paths.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson()
→ Map<String, dynamic>
-
Convert to JSON-serializable map
override
-
toJsonString({bool pretty = false})
→ String
-
Serialize to JSON string
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
visitChildren(SAstVisitor visitor)
→ void
-
Visit all child nodes of this node.
override