TokenStreamIterator
public class TokenStreamIterator : IteratorProtocol
The Iterator created by token streams
-
The iterator generates elements of type
StreamedToken
Declaration
Swift
public typealias Element = StreamedToken
-
Any errors encountered during parsing
Declaration
Swift
public private(set) var parsingErrors: [Error]
-
DO NOT CALL**
Declaration
Swift
public required init()
-
Fetches the next matching token
- Return: The generated token or nil
Declaration
Swift
public func next() -> StreamedToken?
-
True if parsing reached the end of input naturally (that is, encountered no errors)
Declaration
Swift
public var reachedEndOfInput: Bool { get }
-
Declaration
Swift
public func evaluating(_ token: TokenType)
-
Declaration
Swift
public func succeeded(token: TokenType, annotations: RuleAnnotations, range: Range<String.Index>)
-
Declaration
Swift
public func failed()
-
Sets the initial depth to 1
Declaration
Swift
public func willBuildFrom(source: String, with: Grammar)
-
Disables further evaluation
Declaration
Swift
public func didBuild()
-
Disables further evaluation
Declaration
Swift
public func resetState()