Get Schwifty is an app to run Swift on your iOS device. I created this project as an application for a scholarship to Apples WWDC 2017. Get Schwifty is also available on the App Store.
It is using a lexer to power syntax highlighting, a parser, abstract syntax tree to get semantic information about the source code.
The project was created during my application for a scholarship at WWDC 17.
How does that work?!
It's much less magic as it seems in the first moment. I wrote a lexer which creates tokens out of the given source code. This output is also used to create syntax highlighting within a standard UITextView. The tokens are also used by a parser which creates semantic information via an abstract syntax tree.
alert to be able to get some output.
What features are implemented?
The project currently supports the following language features:
- var, let, func declarations
- if, else if and else control structures
- while loops
- simple calculation and conditional expressions
- function calls (currently without external parameters)
- recursive function calls
- simple type system
What features are missing?
The list of missing features is too long for this page, so I will only name one of the most important ones:
- classes, structs and other complex types
- higher order functions
- framework bindings
How can I get it?
The easiest way to get 'Get Schwifty' is by installing it from the App Store. If you would like to test the latest version of the app, send me a message on Twitter (@benchr) and I'll add you to Testflight if there are enough free slots.
What about the license?
Currently I don't want to decide where the project is heading to, so I didn't add a license file. Feel free to clone the project, run it on your device and send contributions. I will add the license later when I decided about it.