removingFirst
Creates a new collection by removing the first element.
This declaration is deprecated: Use CollectionType(node.dropFirst())
func removingFirst() -> Self Returns
A new collection with the first element removed.
Creates a new collection by removing the first element.
This declaration is deprecated: Use CollectionType(node.dropFirst())
func removingFirst() -> Self A new collection with the first element removed.
import SwiftSyntaxA library for working with Swift code.
protocol SyntaxCollection : BidirectionalCollection, ExpressibleByArrayLiteral, SyntaxProtocol where Self.Element : SyntaxProtocol, Self.Index == SyntaxChildrenIndexinit<Children>(_ children: Children) where Children : Sequence, Self.Element == Children.Element init(arrayLiteral elements: Self.Element...) static var structure: SyntaxNodeStructure { get }var count: Int { get }The number of elements, present or missing, in this collection.
var endIndex: SyntaxChildrenIndex { get }var startIndex: SyntaxChildrenIndex { get }subscript(position: SyntaxChildrenIndex) -> Self.Element { get set } static func + (lhs: some Sequence<Self.Element>, rhs: Self) -> Self Creates a new collection by concatenating the elements of a sequence and a collection.
static func + (lhs: some RangeReplaceableCollection<Self.Element>, rhs: Self) -> Self Creates a new collection by concatenating the elements of a sequence and a collection.
static func + (lhs: Self, rhs: some Sequence<Self.Element>) -> Self Creates a new collection by concatenating the elements of a collection and a sequence.
static func + (lhs: Self, rhs: some RangeReplaceableCollection<Self.Element>) -> Self Creates a new collection by concatenating the elements of a collection and a sequence.
static func += (lhs: inout Self, rhs: some Sequence<Self.Element>) Appends the elements of a sequence to a range-replaceable collection.
mutating func append(_ newElement: Self.Element) Adds an element to the end of the collection.
mutating func append(contentsOf newElements: some Sequence<Self.Element>) Adds the elements of a sequence to the end of this collection.
func distance(from start: SyntaxChildrenIndex, to end: SyntaxChildrenIndex) -> Int func filter(_ isIncluded: (Self.Element) throws -> Bool) rethrows -> Self Returns a new SyntaxCollection that just contains the elements satisfying the given predicate.
func index(after index: SyntaxChildrenIndex) -> SyntaxChildrenIndex func index(at offset: Int) -> SyntaxChildrenIndex Returns the index of the n-th element in this collection.
func index(before index: SyntaxChildrenIndex) -> SyntaxChildrenIndex func index(of node: Self.Element) -> SyntaxChildrenIndex? Return the index of node within this collection.
func index(of node: some SyntaxProtocol) -> SyntaxChildrenIndex? Return the index of node within this collection.
mutating func insert(_ newElement: Self.Element, at i: Self.Index) Inserts a new element into the collection at the specified position.
mutating func insert(contentsOf newElements: some Collection<Self.Element>, at i: Self.Index) Inserts the elements of a sequence into the collection at the specified position.
func makeIterator() -> SyntaxCollectionIterator<Self.Element> @discardableResult mutating func remove(at position: Self.Index) -> Self.Element Removes and returns the element at the specified position.
mutating func removeSubrange(_ bounds: Range<Self.Index>) Removes the elements in the specified subrange from the collection.
mutating func replaceSubrange(_ subrange: Range<Self.Index>, with newElements: some Collection<Self.Element>) Replace the nodes in subrange by newElements.
init(_ collection: Self) Initialize the collection from a collection of the same type.
func appending(_ syntax: Self.Element) -> Self Creates a new collection by appending the provided syntax element to the children.
func inserting(_ syntax: Self.Element, at index: Int) -> Self Creates a new collection by inserting the provided syntax element at the provided index in the children.
func prepending(_ syntax: Self.Element) -> Self Creates a new collection by prepending the provided syntax element to the children.
func removing(childAt index: Int) -> Self Creates a new collection by removing the syntax element at the provided index.
func removingLast() -> Self Creates a new collection by removing the last element.
func replacing(childAt index: Int, with syntax: Self.Element) -> Self Creates a new collection by replacing the syntax element at the provided index.