Structureswift-syntax 600.0.1SwiftSyntax
Iterator
Iterates over a TokenSequence
.
struct Iterator
Iterates over a TokenSequence
.
struct Iterator
import SwiftSyntax
A library for working with Swift code.
struct TokenSequence
Sequence of tokens that are part of the provided Syntax node.
init(_ node: Syntax, viewMode: SyntaxTreeViewMode)
Construct a TokenSequence
that walks all tokens in node
in source order, recursively walking into child nodes.
var customMirror: Mirror { get }
A custom mirror for TokenSequence
that shows all elements in the sequence.
func makeIterator() -> Iterator
Create an iterator that iterates over all the tokens in the sequence.
func reversed() -> ReversedTokenSequence
Iterate the tokens in reverse order.
protocol IteratorProtocol<Element>
A type that supplies the values of a sequence one at a time.
mutating func next() -> TokenSyntax?
Return the next element in a TokenSequence
.