title: Recognizing Swift syntax from within coding educational app
body: <p>I'm looking to make an app which allows you to use Swift code within the app - similar to other Swift-based learning education apps to help you learn the language.</p>
  
  <p>Is there a way to use the open source Swift code, for example, in any way to understand the syntax and possibly run the code for typed-in Swift code?</p>
  
  <p>An example of an app I found on the App Store which can do this is called <a href="https://apps.apple.com/gb/app/sedona-compile-swift-program/id1155835459" rel="nofollow noreferrer">Sedona</a>.</p>
  
  <p>From GitHub <a href="https://github.com/apple/swift/tree/master/lib/Syntax" rel="nofollow noreferrer">apple/swift/.../Syntax</a> there looks to be Swift syntax APIs, presumably for use by IDEs.</p>
  
  <ul>
  <li>Am I looking in the wrong place?</li>
  <li>Do these types of apps make their own Swift translator?</li>
  <li>Is there some other way this is done?</li>
  <li>Efficiency &amp; optimization is <em>not</em> a priority, however would be a benefit.</li>
  <li>It in no way <em>needs</em> to include very complex Swift.</li>
  </ul>
  
  <p><em>Note: This is for an iOS app only, so Terminal commands would not work.</em></p>