Swift AST Explorer
  • Fold Sequence Expressions
  • Show Missing Tokens
  • Swift Syntax Version
  • 508.0.1 (Swift 5.8)
  • 509.1.1 (Swift 5.9)
  • 510.0.3 (Swift 5.10)
  • 600.0.1 (Swift 6.0)
  • main branch
System Status
Feedback
Source Code
Creator
Donate
Help
Default Swift Version
Swift 5.9
Parser Options
Fold Sequence Expressions
Use SwiftOperators to 'fold' the syntax tree and rebuild the tree structure according to operator precedence. This option is enabled by default.
Show Missing Tokens
The Swift parser often automatically inserts tokens that are not present in the source code to recover from syntax errors. This option makes the missing tokens automatically inserted by the parser visible.
Import
There are a few different ways to import code into the code editor:
  • Drop a file onto the editor
  • Append a GitHub gist ID to the URL
    (e.g. swift-ast-explorer.com/<gist_id_goes_here>)
  • Or just start typing!
Feedback / Bug Report
github.com/swiftfiddle/swift-ast-explorer