{"repo":"toprakdeviren/msf","free":true,"listed":false,"github":"https://github.com/toprakdeviren/msf","clone":"git clone https://github.com/toprakdeviren/msf.git","description":"Swift language lexer, parser, semantic","language":"C","stars":303,"topics":["lexer","parser","swift","swiftui"],"license":"MIT","category":"mobile-apps","readme_excerpt":"msf — Mini Swift Frontend A single-header C library that takes Swift source code and produces a fully typed abstract syntax tree. No LLVM, no codegen, no runtime — just the frontend. What it does msf implements the first three stages of a Swift compiler: Lexer — Tokenizes Swift source into keywords, identifiers, literals, operators. SWAR fast-path for ASCII identifiers, memchr-based SIMD string scanning, binary-search keyword detection (sorted table, O(log 67)). Parser — Recursive descent with Pratt precedence climbing for expressions. Produces an immutable AST. Handles the full Swift grammar: generics, closures, pattern matching, custom operators, async / await , property wrappers. Sema — Three-pass semantic analysis: 1. Declare — Forward-registers all symbols (enables mutual references) 2. Resolve — Bottom-up type inference with overload resolution 3. Conform — Protocol conformance checking with conditional conformance support The output is a typed AST where every node has a resolved TypeInfo . You can walk it, serialize it (text / JSON / S-expression), or feed it to your own backend. Single-file analysis is just the entry point. msf also: - Analyzes a whole module — many files compiled as one unit, so a type declared in one file resolves from its siblings ( MSFModule ). - Resolves cross-module imports with no SDK present — a module's public type surface is extracted from its .swiftinterface into a compact, portable .msfvocab that loads anywhere, including the browser (WASM","default_branch":null,"files":null,"tree":[],"storefront":"/r/toprakdeviren","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/toprakdeviren/msf/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}