TreeSitterArray<T> class final

Managed generic adaptation of Tree-sitter 0.25.10's Array(T).

The native size and capacity fields remain independently observable. Dart owns the backing storage, so raw pointers and byte element sizes are intentionally omitted. zeroValue models C's byte-zero initialization for typed values used by array_grow_by and null-content splices.

Constructors

TreeSitterArray({required T zeroValue()})
TreeSitterArray.from(Iterable<T> values, {required T zeroValue()})
factory

Properties

capacity int
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
no setter
values List<T>
no setter

Methods

assign(TreeSitterArray<T> other) → void
Managed _array__assign; retained excess capacity matches native C.
delete() → void
Managed _array__delete; the reset array can be reused like native C.
erase(int index) → void
Managed _array__erase with the native overlapping left shift.
grow(int count) → void
Managed _array__grow; this reserves space but does not change size.
growBy(int count) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push(T value) → void
reserve(int newCapacity) → void
Managed _array__reserve.
splice(int index, int oldCount, int newCount, Iterable<T>? newValues) → void
Managed _array__splice.
swap(TreeSitterArray<T> other) → void
Managed _array__swap, exchanging contents, size, and capacity.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → T
operator []=(int index, T value) → void