~/talk

SwiftSyntax: for good and evil

Talkat try! Swift Tokyo 2025 · 2025-04-09..04-11· [swift, developer-experience]
slides:none on file

Explains how SwiftSyntax (16 modules) parses a concrete syntax tree and how the demo builds a small REPL called ripple that uses SwiftSyntax parser, operator table foldAll from SwiftOperators to resolve precedence, and SyntaxVisitor / SyntaxAnyVisitor to walk nodes; adds ParserDiagnosticsGenerator for errors and a SyntaxRewriter preprocessor to inject missing types. Interpreter evaluates ints, floats, strings, booleans, variables and recursion (Fibonacci) but crashes on unknown operators until handled and ultimately ends up dynamically typed — more JavaScript‑like than Swift.

AI-written summary · about

  1. 0:00Introduction
  2. 2:11SwiftSyntax uniqueness
  3. 3:38Simple interpreter
  4. 6:24Evaluating expressions
  5. 8:31Testing with Ripple
  6. 9:35Syntax errors and diagnostics
  7. 12:48Fixing crashes with operators
  8. 14:55Detecting unsupported syntax
  9. 16:21Better errors with diagnostics
  10. 18:50Variables and types
  11. 20:14Expanding interpreter
  12. 21:39Rejecting type annotations
  13. 23:24Testing type-free Swift
  14. 25:53Final adjustments
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.