Mockingbird Documentation 0.15.0

Function parse​Mangled​Swift​Symbol(_:​is​Type:​symbolic​Reference​Resolver:​)

public func parseMangledSwiftSymbol<C: Collection>(_ mangled: C, isType: Bool = false, symbolicReferenceResolver: ((Int32, Int) throws -> SwiftSymbol)? = nil) throws -> SwiftSymbol where C.Iterator.Element == UnicodeScalar

Pass a collection of UnicodeScalars containing a Swift mangled symbol or type, get a parsed SwiftSymbol structure which can then be directly examined or printed.

Parameters

mangled C

the collection of UnicodeScalars to be parsed ("isType` is false, the string should start with a Swift Symbol prefix, _T, _$S or $S).

is​Type Bool

if true, no prefix is parsed and, on completion, the first item on the parse stack is returned.

Throws

a SwiftSymbolParseError error that contains parse position when the error occurred.

Returns

the successfully parsed result