~/talk

Building a Programming Language in Swift

Talkat UIKonf 2020 · 2020-05-17..05-20· [compilers-and-language-design, swift]
slides:none on file

Builds a minimal HTML templating language in Swift that actually parses and evaluates code into HTML showing strings, integers, variables, nested tags, function values and calls, and let bindings and it works end to end. Parser uses recursive functions over Substring slices for performance and comma separated arg lists, AST is an indirect enum, evaluator uses a context map to resolve variables and create nested scopes, errors carry positions by annotating the AST with source ranges via a generic wrapper and the implementation escapes strings when embedding into tags and is ready for adding a type checker or recovery.

AI-written summary · about

  1. 0:00Introduction
  2. 6:28Expression Types
  3. 12:35Parse
  4. 16:09Evaluation
  5. 24:26Complex Expressions
~/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.