• Stars
    star
    114
  • Rank 300,972 (Top 7 %)
  • Language
    Swift
  • Created about 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An implementation of Swift mangled symbol parsing and demangled printing in Swift.

CwlDemangle

A translation (line-by-line in many cases) of Swift's Demangler.cpp into Swift.

License note

I usually place my code under an ISC-style license but since this project is derived from the Swift project, it is covered by that project's Apache License 2.0 with runtime library exception.

Usage

Parse a String containing a mangled Swift symbol with the parseMangledSwiftSymbol function:

let swiftSymbol = try parseMangledSwiftSymbol(input)

Print the symbol to a string with description (to get the .default printing options) or use the print(using:) function, e.g.:

let result = swiftSymbol.print(using:
   SymbolPrintOptions.default.union(.synthesizeSugarOnTypes))

Article

Read more about this project in the associated article on Cocoa with Love: Comparing Swift to C++ for parsing

More Repositories

1

AudioStreamer

A streaming audio player class (AudioStreamer) for Mac OS X and iPhone.
Objective-C
1,935
star
2

CwlUtils

A collection of Swift utilities as documented on cocoawithlove.com
Swift
598
star
3

CwlSignal

A Swift framework for reactive programming.
Swift
302
star
4

CwlPreconditionTesting

A Mach exception handler that allows Swift precondition failures to be caught and tested.
Swift
168
star
5

CwlViews

Wrappers around AppKit and UIKit, turning them into declarative, reactive-driven frameworks.
Swift
167
star
6

CombineExploration

Some tests and sample code that explore a few behaviors of Apple's Combine framework.
Swift
105
star
7

Clocks

An iOS world-time app written in Swift to demonstrate the benefits of treating view-state as a separate model.
Swift
100
star
8

CocoaWithLovePlaygrounds

Swift Playground versions of select articles from Cocoa with Love.
Swift
88
star
9

CwlFeedReader

A JSON feed reader used in the App architecture basics in SwiftUI series on CocoaWithLove.com
Swift
32
star
10

Mines

A half-hearted minesweeper implementation from Mac OS 8, resurrected for macOS Sierra.
C++
31
star
11

CwlWhitespace

A whitespace policing source command extension for Xcode 8.
Swift
26
star
12

CwlWorstPossibleApplication

A Minesweeper clone in Swift deliberately implemented without a separated Model.
Swift
19
star
13

CwlCatchException

Catch Objective-C exceptions by NSException subtype in a Swift closure/function.
Swift
15
star
14

Playgrounds2017

Code used during my talk at the Playgrounds Conference held in Melbourne, Feb 2017.
Swift
6
star