Moduleswift-standard-library
RegexParser
import _RegexParser
import _RegexParser
func lexRegex(start: UnsafeRawPointer, end: UnsafeRawPointer) throws -> (contents: String, Delimiter, end: UnsafeRawPointer)
func parse<S>(S, SyntaxOptions) throws -> AST
func parseWithDelimiters<S>(S) throws -> AST
Parses a given regex string with delimiters, inferring the syntax options from the delimiters used.
func parseWithDelimitersWithRecovery<S>(S) -> AST
Parses a given regex string with delimiters, inferring the syntax options from the delimiters used.
func parseWithRecovery<S>(S, SyntaxOptions) -> AST
func validate(AST) -> AST
Check a regex AST for semantic validity.
struct AST
A regex abstract syntax tree.
struct AnyType
A wrapper of an existential metatype, equatable and hashable by reference.
struct CaptureList
struct Delimiter
struct DelimiterLexError
struct Diagnostic
A diagnostic to emit.
struct Diagnostics
A collection of diagnostics to emit.
struct PrettyPrinter
State used when to pretty-printing regex ASTs.
struct Source
The source of text being given to a parser.
struct SyntaxOptions
struct Unreachable
struct Unsupported