inserting(_:at:)

Creates a new collection by inserting the provided syntax element at the provided index in the children.

SyntaxCollection.swift:159

This declaration is deprecated: Create a new array of elements and construct a new collection type from those elements

func inserting(_ syntax: Element, at index: Int) -> Self

Parameters

syntax

The element to insert.

index

The index at which to insert the element in the collection.

Returns

A new collection with that element appended to the end.