All Projects → keith → Xcode Ast Dump

keith / Xcode Ast Dump

Licence: mit
Dump the AST of your Swift Xcode project

Programming Languages

python
139335 projects - #7 most used programming language
swift
15916 projects

Labels

Projects that are alternatives of or similar to Xcode Ast Dump

Mgtextplus
Xcode Source Editor Extension
Stars: ✭ 57 (-19.72%)
Mutual labels:  xcode
Scxcodeeditorinset
Xcode plugin that adds an empty (configurable) space to the end of the editor text view
Stars: ✭ 64 (-9.86%)
Mutual labels:  xcode
Imageslideshow
A Swift Image SlideShow for iOS
Stars: ✭ 68 (-4.23%)
Mutual labels:  xcode
React Native Doc Viewer
React Native Doc Viewer (Supports file formats: xls,ppt,doc,xlsx,pptx,csv,docx,png,jpg,pdf,xml,binary ...)
Stars: ✭ 58 (-18.31%)
Mutual labels:  xcode
Csstree
A tool set for CSS including fast detailed parser, walker, generator and lexer based on W3C specs and browser implementations
Stars: ✭ 1,121 (+1478.87%)
Mutual labels:  ast
Astexplorer.app
https://astexplorer.net with ES Modules support and Hot Reloading
Stars: ✭ 65 (-8.45%)
Mutual labels:  ast
Vipera
Project is now called Swift template, check the link ➡️
Stars: ✭ 57 (-19.72%)
Mutual labels:  xcode
Articles
Articles for NSHipster.com
Stars: ✭ 1,166 (+1542.25%)
Mutual labels:  xcode
Nord Xcode
An arctic, north-bluish clean and elegant Xcode color theme.
Stars: ✭ 63 (-11.27%)
Mutual labels:  xcode
Xcodeicontagger
Adds version and commit hash as an overlay to your iOS app's icon.
Stars: ✭ 66 (-7.04%)
Mutual labels:  xcode
Dyci Main
Dynamic Code Injection Tool for Objective-C
Stars: ✭ 1,103 (+1453.52%)
Mutual labels:  xcode
React Native Nfc Ios
Easy to use CoreNFC for React Native
Stars: ✭ 59 (-16.9%)
Mutual labels:  xcode
Automaticcompletionplugin
Objc,Getter 函数自动补全插件,基于 Xcode 8 的 Source Editor Extension 开发
Stars: ✭ 65 (-8.45%)
Mutual labels:  xcode
Learningopencv
Source code for Learning OpenCV 《学习OpenCV》源码及 Mac 运行工程
Stars: ✭ 57 (-19.72%)
Mutual labels:  xcode
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-2.82%)
Mutual labels:  xcode
Uitestingexample
Example code from my blog post about UI testing
Stars: ✭ 57 (-19.72%)
Mutual labels:  xcode
Go2ast
Transform Go code into it's AST
Stars: ✭ 65 (-8.45%)
Mutual labels:  ast
Xcodeappplugintemplate
App Plugin Project Template For iOS App And Mac App. Make it easy to hook app.
Stars: ✭ 71 (+0%)
Mutual labels:  xcode
Assert
A collection of convenient assertions for Swift testing
Stars: ✭ 69 (-2.82%)
Mutual labels:  xcode
Charly Vm
Fibers, Closures, C-Module System | NaN-boxing, bytecode-VM written in C++
Stars: ✭ 66 (-7.04%)
Mutual labels:  ast

xcode-ast-dump

This is a simple script for dumping the Swift AST from within Xcode. Read more about how and why this works here.

Usage

In Xcode:

  1. In the build settings for the target that you're interested in dumping the AST for, set the SWIFT_EXEC user defined build setting to the path of ast.py.
  2. Add AST_DUMP_FILE="$(SRCROOT)/$(TARGET_NAME).ast" to Preprocessor Macros(GCC_PREPROCESSOR_DEFINITIONS) setting. You can put any path you want. This path will be used for saving build log information with ast tree dump
  3. Build the target
  4. Check output file, you set in AST_DUMP_FILE setting.

In a shell:

  1. Build your target normally
  2. Go to the Report Navigator
  3. Find the "Compile Swift Sources" step from your build (if it was an incremental build you may have to clean your project first)
  4. Copy the arguments that were passed to swiftc
  5. Escape any special characters such as & (Xcode escapes spaces but not special shell characters. In order to pass them to this script you'll have to escape them yourself)
  6. Run ./ast.py ARGUMENTS > output.ast 2>&1

Notes

  • For larger projects this will take a very long time to run and may cause Xcode to hang, if this happens it might be easier to run from a shell
  • If you integrate the script in Xcode, the build will fail but the AST output will still be in the build log
  • The larger the project, the larger the output, you may end up opening a very large file
  • This script calls swiftc based on the environment variables from Xcode, or the first one that's found in your $PATH. This may not be what you expect. Set the AST_SWIFTC environment variable if you would like to change this
  • This has only been tested with a small number of projects, please file any issues you find
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].