swiftlang/swift-syntax
59.6
Adequate · 30 September 2026
85.2k
lines of production code
Swift
primary language
2
measurements over time
What this system is
This system is a comprehensive Swift syntax analysis and transformation library that parses source code into immutable syntax trees and provides utilities for code generation, refactoring, and macro expansion. It includes specialized modules for lexical lookup, operator precedence folding, and diagnostic reporting, enabling tools to analyze, modify, and format Swift code programmatically. The system also supports compiler plugin infrastructure and offers a command-line interface for testing and debugging parsing operations.
How it got here
2017–2022 — Modularization and performance optimization
29 changes.
The project underwent a major architectural shift, splitting SwiftSyntax into distinct, modular libraries for parsing, diagnostics, operators, and refactoring while migrating the build system to Bazel and CMake. Significant internal refactoring introduced arena-based memory management and performance tracking, alongside comprehensive test coverage and documentation for the new modular structure.
2023 — Swift 6 compatibility and macro expansion infrastructure
52 changes.
This period focused on refactoring the parser lexer and centralizing macro expansion logic to support Swift 6 requirements, including updated protocol interfaces and generated code. It also introduced new modules like SwiftIDEUtils and SwiftCompilerPluginMessageHandling, while significantly expanding the macro example suite and test coverage across the codebase.
2024–2026 — New lookup and plugin infrastructure
22 changes.
This period focused on building foundational infrastructure for advanced name lookup and dynamic plugin loading, introducing the SwiftLexicalLookup and SwiftIfConfig libraries alongside a new dynamic library plugin provider. Significant effort was also directed toward enhancing test support utilities and adding refactoring capabilities for Swift Package Manifests.
Features
Add Bazel build support and update build configuration
The project now supports building with Bazel, introducing a new MODULE.bazel manifest (including rules\_swift 2.9.0), a .bazelversion file (9.0.1), and a comprehensive BUILD.bazel file defining targets for all SwiftSyntax modules (e.g., SwiftSyntax, SwiftParser, SwiftDiagnostics, SwiftIDEUtils). Build configuration is standardized via .bazelrc (enabling whole-module optimization and setting macOS minimum OS to 13.0) and .swift-format (setting line length to 120). Additionally, legacy Swift-based build and parsing utilities (AtomicCache, RawSyntax, SwiftSyntax, SwiftcInvocation) have been removed.
(repo-wide) · high confidence
Add MemberAttribute macro examples for deprecation and property wrapping
The Examples/Sources/MacroExamples/Implementation/MemberAttribute location now includes two new macro implementations: MemberDeprecatedMacro, which adds a deprecation attribute to members, and WrapStoredPropertiesMacro, which applies a specified attribute to stored properties within a type. These files demonstrate how to implement MemberAttributeMacro to modify member declarations based on attributes attached to the containing type.
Examples/Sources/MacroExamples/Implementation/MemberAttribute · high confidence
Add Swift Refactor Editor Extension for Testing
A new Xcode project has been added to create a Swift Refactor editor extension (Swift Refactor.appex) designed for testing refactorings. This extension integrates with Xcode via the XcodeKit framework and leverages SwiftSyntax, SwiftParser, SwiftOperators, and SwiftRefactor libraries to provide refactoring capabilities within the editor. The project includes a Host application for testing purposes and is configured to embed the extension properly.
EditorExtension/SwiftRefactorExtension.xcodeproj · high confidence
Add SwiftIfConfig library documentation
Added DocC documentation for the SwiftIfConfig library, including an overview of its purpose (evaluating \#if conditionals within a Swift syntax tree) and descriptions of its key utilities such as ActiveSyntaxVisitor, removingInactive, activeClause, and configuredRegions.
Sources/SwiftIfConfig/SwiftIfConfig.docc · high confidence
Add SwiftParser documentation with availability and usage examples
Added documentation for the SwiftParser framework, including an Info.plist that declares availability for macOS 10.15+, Mac Catalyst 13.0+, iOS 13.0+, tvOS 13.0+, and watchOS 6.0, and a main page detailing design principles (resilient, efficient, source-preserving, minimal context, incremental) and a quickstart guide showing how to parse Swift source code into a syntax tree using \Parser.parse\.
Sources/SwiftParser/SwiftParser.docc · high confidence
Add SwiftRefactor Xcode Source Editor Extension
A new Xcode source editor extension named 'SwiftRefactor' has been added, allowing users to apply refactoring commands directly within the Xcode editor. The extension dynamically discovers and registers \SyntaxRefactoringProvider\ implementations from the SwiftRefactor module at launch, exposing them as selectable commands in the source editor interface.
EditorExtension/SwiftRefactorExtension · high confidence
Add SwiftSyntax By Example tutorial
A new DocC tutorial titled 'SwiftSyntax By Example' has been added to the documentation, guiding users through building a command-line tool that formats and sorts import statements in Swift files. The tutorial covers setting up a Swift Package with SwiftSyntax and SwiftParser, parsing source code into a syntax tree, classifying and sorting import declarations, and using syntax transformation APIs to output the modified code.
Sources/SwiftSyntax/Documentation.docc/Tutorials · high confidence
Add SwiftSyntaxBuilder code generation example
A new example application has been added to the Examples package that demonstrates how to use SwiftSyntax and SwiftSyntaxBuilder to programmatically generate Swift source code. The application defines a main entry point that constructs a Person struct with properties and corresponding setter methods, printing the resulting formatted source code to the console.
Examples/Sources/CodeGenerationUsingSwiftSyntaxBuilder · high confidence
Add example macro to increment integer literals
Added an example Swift tool that uses the SwiftSyntax library to parse source code and increment all integer literals by one (e.g., turning \2\ into \3\ and \3\_000\ into \3001\).
Examples/Sources/AddOneToIntegerLiterals · high confidence
Add platform mutex shim with WASI no-op support
The \_SwiftSyntaxCShims module now includes a C-based platform mutex implementation that provides thread synchronization on macOS (os\_unfair\_lock), Windows (SRWLock), and POSIX systems (pthread). For WebAssembly WASI targets, the implementation detects the lack of threading support and provides a no-op mutex, allowing the library to build and function in single-threaded environments without crashing or requiring external threading libraries.
_Sources/\SwiftSyntaxCShims · high confidence
Add version marker modules for SwiftSyntax 5.09–6.05
The Sources/VersionMarkerModules directory now includes empty Swift modules (SwiftSyntax509 through SwiftSyntax605) and a CMake build configuration for them. These modules serve as version indicators, allowing packages to detect which version of swift-syntax they are building against.
Sources/VersionMarkerModules · high confidence
Added Examples-all aggregate target
A new 'Examples-all' target has been introduced to serve as a single entry point that depends on all example targets within the package, simplifying the build process for users who wish to compile all examples at once.
Examples/Sources/Examples-all · high confidence
Added SwiftSyntax tutorial resources for building an import formatter
The documentation resources now include a series of step-by-step Swift source files (Formatter.step1.swift through Formatter.step11.swift and Package.step1.swift through Package.step5.swift) that demonstrate how to build an import formatter using SwiftSyntax. These files provide incremental code examples for parsing source files, classifying import declarations, sorting them, and managing trivia, along with corresponding Package.swift configurations for setting up the project dependencies and targets.
Sources/SwiftSyntax/Documentation.docc/Resources · high confidence
Added documentation for filing BasicFormat bug reports
Users can now find a dedicated guide on how to file actionable bug reports for BasicFormat failures. The new documentation explains that BasicFormat focuses on adding trivia to preserve parseability and provides step-by-step instructions for using the \swift-parser-cli\ utility to reduce and reproduce formatting issues before submitting a report via the swiftlang/swift-syntax GitHub repository.
Sources/SwiftBasicFormat/SwiftBasicFormat.docc · high confidence
Added documentation for writing Swift macros
Added a new documentation article for the SwiftSyntaxMacros module that explains how to write, declare, and test Swift macros, including an example implementation of an EnumSubset macro.
Sources/SwiftSyntaxMacros/SwiftSyntaxMacros.docc · high confidence
Expose SwiftCompilerPlugin as a CMake library
The SwiftCompilerPlugin module is now buildable via CMake, allowing consumers to link against it directly. This change introduces a CMakeLists.txt file that defines the library and links it publicly to SwiftSyntaxMacros and SwiftCompilerPluginMessageHandling, making the plugin infrastructure more accessible for external build systems.
Sources/SwiftCompilerPlugin · high confidence
Initial documentation for the SwiftOperators module
Added the official documentation entry for the SwiftOperators module, which provides an implementation of Swift's user-defined operator declarations and precedence groups. The documentation explains how the library interprets operator and precedence group declarations to fold SequenceExprSyntax nodes into structured syntax trees that fully express the order of operations, and includes quickstart examples and error handling guidance.
Sources/SwiftOperators/SwiftOperators.docc · high confidence
Introduce CMake build system and new parser source files
The SwiftParser module now supports building via CMake, defined in Sources/SwiftParser/CMakeLists.txt, which lists the parser's source files and links against SwiftSyntax and SwiftDiagnostics. This change introduces several new source files to the parser: CharacterInfo.swift for ASCII identifier classification, CompilerFiles.swift for parsing macro expansion file types (availability, accessor, attribute, code block, and member block), ExpressionInterpretedAsVersionTuple.swift for re-interpreting expressions as version tuples, and IncrementalParseTransition.swift which manages incremental parsing state, reused node callbacks, and arena compaction thresholds.
Sources/SwiftParser · high confidence
Introduce DiagnosticDecorator protocol with ANSI and Basic implementations
A new \DiagnosticDecorator\ protocol has been added to allow customizable formatting of diagnostic output, including messages, buffer outlines, and code highlights. Two default implementations are provided: \ANSIDiagnosticDecorator\, which applies severity-based ANSI color codes and hyperlinks for diagnostic categories, and \BasicDiagnosticDecorator\, which provides plain-text severity prefixes without colorization. This enables users to choose between rich terminal formatting and simple text output for diagnostics.
Sources/SwiftDiagnostics/DiagnosticDecorators · high confidence
Introduce SwiftBasicFormat for syntax tree formatting
Adds the SwiftBasicFormat library, providing a \BasicFormat\ rewriter that performs basic formatting on Swift syntax trees, including indentation management, whitespace normalization, and multiline string literal handling. The module exposes an \indented(by:)\ API for applying indentation to syntax nodes and an \inferIndentation(of:)\ method that analyzes source code to automatically detect indentation width (spaces or tabs). Users can format syntax nodes via the \formatted(using:)\ extension, which applies the basic formatting rules to ensure consistent code structure.
Sources/SwiftBasicFormat · high confidence
Introduce SwiftCompilerPluginMessageHandling module for compiler-plugin communication
This change introduces the new \SwiftCompilerPluginMessageHandling\ module, which centralizes the logic for bidirectional JSON-based communication between the Swift compiler host and macro plugins. It provides the \CompilerPluginMessageListener\ to manage the message loop, \StandardIOMessageConnection\ for I/O (including WASI support), and an LRU-cached \ParsedSyntaxRegistry\ to optimize syntax parsing. The module defines the plugin message protocol (version 8), including support for new macro roles like \body\ and \codeItem\, and handles diagnostic translation and macro expansion requests.
Sources/SwiftCompilerPluginMessageHandling · high confidence
Introduce SwiftDiagnostics module for structured diagnostic reporting
The \SwiftDiagnostics\ module has been extracted from \SwiftSyntax\ to provide a dedicated, modular system for creating, grouping, and formatting compiler diagnostics. This change introduces \Diagnostic\ and \Note\ structs with support for severity levels (error, warning, note, remark), categories, and Fix-Its, allowing tools to present richer, more structured error messages. It adds \GroupedDiagnostics\ to manage diagnostics across multiple source files (such as macro expansions) and a \DiagnosticsFormatter\ with pluggable decorators to render annotated source code with syntax highlighting and colorization. Convenience APIs like \Error.asDiagnostics(at:)\ and \FixIt.replace\ simplify diagnostic creation, while the new CMake build configuration ensures the module is properly integrated into the build system.
Sources/SwiftDiagnostics · high confidence
Introduce SwiftLexicalLookup for identifier and qualified name resolution
Adds the new SwiftLexicalLookup library, providing infrastructure for lexical name lookup and qualified type resolution. The library introduces a \LookupConfig\ to control lookup scope behavior (such as sequential scope termination and \\#if\ region handling), defines \LookupName\ and \LookupResult\ types to represent found identifiers, implicit declarations (like \self\, \Self\, \error\), and lookup directives (such as looking for members or generic parameters), and implements various scope handlers (function, generic parameter, nominal type, etc.) to support identifier-based and qualified lookups within Swift syntax trees.
Sources/SwiftLexicalLookup · high confidence
Introduce SwiftOperators library for parsing and folding operator precedence
This change adds the new SwiftOperators library, which provides the infrastructure to parse, validate, and fold sequences of operator expressions into structured syntax trees. It introduces core types such as Operator, PrecedenceGroup, and OperatorTable, along with built-in standard operator tables (e.g., logical, arithmetic) and the ability to integrate custom operator declarations from source files. The library also supports hoisting try, await, and unsafe expressions during folding and exposes public APIs to look up infix, prefix, and postfix operators by name.
Sources/SwiftOperators · high confidence
Introduce SwiftParserCLI as a standalone diagnostic and testing tool
The \swift-parser-cli\ utility is now available as a separate package, providing a suite of subcommands for inspecting and testing Swift syntax parsing. Users can now format source code with \basic-format\, inspect parsed syntax trees and diagnostics via \print-tree\ and \print-diags\, verify source round-tripping with \verify-round-trip\, and automatically reduce failing test cases using the \reduce\ command. Additionally, a \performance-test\ subcommand allows benchmarking parser speed and instruction counts across directories, while the \print\ command offers a simple way to output parsed source.
SwiftParserCLI · high confidence
Introduce SwiftRefactor library for code transformations
The new SwiftRefactor library provides a set of refactoring actions for Swift code, including converting function calls to trailing closure syntax, expanding editor placeholders (including those that can be converted to trailing closures), and editing Package.swift manifests (adding dependencies, targets, products, plugin usages, and settings). It exposes two refactoring provider protocols—EditRefactoringProvider for textual edits and SyntaxRefactoringProvider for structural transformations—and is built on SwiftSyntax, SwiftParser, and SwiftSyntaxBuilder.
Sources/SwiftRefactor · high confidence
Introduce SwiftWarningControl library for @diagnose attribute support
Adds the SwiftWarningControl library, which provides the infrastructure to evaluate \@diagnose\ (and legacy \@warn\) attributes within a Swift syntax tree. This library enables clients to query the effective behavior (error, warning, or ignored) of specific diagnostic groups at any source location, accounting for lexical scoping, file-scoped defaults, and active \\#if\ directives. It also supports diagnostic group inheritance, allowing controls on parent groups to propagate to subgroups, and exposes a public API for integrating these source-level warning controls into the compiler.
Sources/SwiftWarningControl · high confidence
Introduce \_SwiftSyntaxCShims module with atomic, mutex, and platform shims
The \_SwiftSyntaxCShims module is now available as a unified C shim layer, providing Swift-accessible wrappers for platform-specific functionality. This includes atomic operations (AtomicBool, AtomicPointer) and platform mutexes (PlatformMutex) for concurrency, as well as renamed C standard library wrappers (swiftsyntax\_errno, swiftsyntax\_stdout/stdin/stderr) that replace direct imports of platform SDK modules like Darwin or Glibc. The module exposes these via a single umbrella header and module map, allowing Swift code to import \_SwiftSyntaxCShims instead of conditionally importing platform-specific modules.
_Sources/\SwiftSyntaxCShims/include · high confidence
Introduce internal type lookup and resolution infrastructure
Adds the foundational components for the new type lookup system within the \SwiftLexicalLookup\ module. This includes a \SymbolTable\ to manage source files and build configurations, a \TypeGraph\ to track types and their extensions, and a \TypeResolver\ to perform structural type resolution. The change also introduces \PartialTypeResolution\ to handle initial parsing of type syntax (such as optionals, tuples, and member access) and \UnqualifiedTypeLookup\ to search for type declarations in local scopes, while \ExtensionFinder\ handles the collection of top-level extensions for binding.
Sources/SwiftLexicalLookup/TypeLookup · high confidence
Introduce new QualifiedLookup syntax wrapper types and declaration models
The QualifiedLookup module now includes a suite of new syntax wrapper types and declaration models to support qualified name resolution. This adds \Attached\<Node\>\ to wrap syntax nodes anchored to a source file, \DeclGroupSyntaxType\ to unify struct, enum, class, actor, protocol, and extension declarations, and \NominalTypeDeclSyntax\ to specifically handle nominal types. It also introduces \TypeDeclSyntax\ for broader type-related declarations (including aliases and generic parameters), \TypeLikeSyntax\ to represent either concrete type syntax or nominal type declarations, and \ValueDeclSyntax\ to model value declarations like functions, variables, and macros. Additionally, \DeclName\ and \DeclNameReferenceBase\ provide canonical, hashable representations of declaration names for lookup, while \DeclScope\ and \MemberKind\ support scope resolution and result filtering.
Sources/SwiftLexicalLookup/QualifiedLookup · high confidence
Introduces custom JSON encoder and decoder for compiler plugin messages
The compiler plugin message handling layer now uses a newly added, internal JSON encoder and decoder (replacing any previous reliance on external libraries or system frameworks) to serialize and deserialize plugin communication data. This change provides a dedicated, lightweight serialization path for Swift values to and from JSON byte arrays, ensuring consistent encoding/decoding behavior for macro and plugin messages without external dependencies.
Sources/SwiftCompilerPluginMessageHandling/JSON · high confidence
New LibraryPluginProvider for loading dynamic library macros
Added a new \LibraryPluginProvider\ component that enables the Swift compiler to load macro implementations from shared dynamic libraries at runtime. This singleton provider manages the lifecycle of loaded plugins, allowing the compiler to resolve macro types by their module and type names from dynamically linked binaries, with platform-specific loading logic for Windows (LoadLibraryW) and Unix-like systems (dlopen).
Sources/SwiftLibraryPluginProvider · high confidence
New SwiftIDEUtils module for syntax classification and fix-it application
A new \SwiftIDEUtils\ library has been introduced, consolidating syntax classification and fix-it application logic to support tools like SourceKit-LSP. This module provides \SyntaxClassifier\ to generate \SyntaxClassifiedRange\ sequences for syntax highlighting, and \NameMatcher\ to resolve declaration names and argument labels at specific source positions. It also includes \FixItApplier\ to safely apply diagnostic fix-its to syntax trees, handling conflict resolution and duplicate insertion options. The module includes compatibility aliases for deprecated classification types to ease migration.
Sources/SwiftIDEUtils · high confidence
New SwiftIfConfig library for evaluating \#if conditions
A new SwiftIfConfig library has been introduced to evaluate \\#if\ compilation conditions against a build configuration. It provides a \BuildConfiguration\ protocol to define available conditions (such as OS, architecture, and custom flags) and a \StaticBuildConfiguration\ struct for static setups. The library includes APIs to determine active syntax regions via \ConfiguredRegions\, remove inactive code with \removingInactive\, and walk or rewrite syntax trees using \ActiveSyntaxVisitor\ and \ActiveSyntaxRewriter\. It also supports detailed diagnostics for invalid or deprecated conditions, such as \TARGET\OS\\*\ macros or \macabi\ usage.
Sources/SwiftIfConfig · high confidence
New SwiftSyntax documentation articles and glossary
The SwiftSyntax documentation package now includes several new articles and a glossary to help users understand and work with the library. A new Glossary defines key terms like Layout Node, RawSyntax, and Trivia. A 'Working with SwiftSyntax' article explains core concepts such as syntax trees, immutability, source fidelity, and resilience, along with guides on navigating and modifying the tree. A 'Macro Versioning' article provides guidance on handling breaking API changes when updating swift-syntax dependencies using conditional compilation. Additionally, a 'RawSyntaxValidation' article explains how to use the SWIFTSYNTAX\_ENABLE\_RAWSYNTAX\_VALIDATION environment variable for testing macro implementations.
Sources/SwiftSyntax/Documentation.docc · high confidence
New complex macro implementation examples added
Added example implementations for \DictionaryStorageMacro\, \ObservableMacro\, and \OptionSetMacro\ in the ComplexMacros module. These files demonstrate advanced macro patterns, including member and accessor generation for dictionary-backed storage, observation registration and property accessors, and OptionSet conformance with nested enum handling.
Examples/Sources/MacroExamples/Implementation/ComplexMacros · high confidence
New expression macro examples added
Added new example implementations for expression macros, including AddBlocker (which warns on addition operators and offers a fix-it), FontLiteralMacro, SourceLocationMacro (providing file ID, file path, line, and column), StringifyMacro, URLMacro (validating static string literals at compile time), and WarningMacro (mimicking the built-in \#warning).
Examples/Sources/MacroExamples/Implementation/Expression, Examples/Sources/MacroExamples/Playground · high confidence
New macro examples: accessor, declaration, and extension macros
The MacroExamples implementation now includes new example macros: EnvironmentValueMacro (an accessor macro that provides get/set accessors using a dictionary key), FuncUniqueMacro (a declaration macro that generates a class with a uniquely named function), and EquatableExtensionMacro (an extension macro that adds Equatable conformance). These are registered in the plugin's providingMacros list alongside existing macros like DefaultFatalErrorImplementationMacro.
Examples/Sources/MacroExamples/Implementation · high confidence
New macro expansion context capabilities: lexical context, build configuration, and abstract source locations
Macro authors now have access to richer context information during expansion. The \MacroExpansionContext\ protocol introduces a \lexicalContext\ property that returns a sanitized array of enclosing scopes (functions, closures, types, etc.) with bodies and members stripped to prevent macros from seeing unrelated code, including special handling for \try\, \await\, and \unsafe\ expressions in sequence expressions. A new \buildConfiguration\ property allows macros to detect whether they are compiling in Debug or Release mode. Additionally, the \AbstractSourceLocation\ struct replaces direct source location access with expression-based file, line, and column references, and the context now provides \addDiagnostics(from:error:)\ to automatically convert thrown errors into diagnostics.
Sources/SwiftSyntaxMacros · high confidence
New macro implementation examples added to Member category
Added four new macro implementation examples in the Member category: CaseDetectionMacro generates boolean properties for enum cases, CustomCodable creates CodingKeys enums with support for custom key names via the CodableKey peer macro, MetaEnumMacro generates a nested meta-enum with an initializer for parent enum cases, and NewTypeMacro creates a newtype struct with a raw value typealias and initializer.
Examples/Sources/MacroExamples/Implementation/Member · high confidence
New macro test assertion support module
The \SwiftSyntaxMacrosGenericTestSupport\ module has been introduced to provide generic testing utilities for Swift macros. It exposes public types such as \TestFailureLocation\, \TestFailureSpec\, \NoteSpec\, and \FixItSpec\, allowing developers to write assertions that verify the diagnostic notes and Fix-Its generated by macro expansions. The implementation uses conditional compilation to apply \public import\ visibility for Swift 6 and later, ensuring compatibility across compiler versions while keeping internal dependencies private.
Sources/SwiftSyntaxMacrosGenericTestSupport · high confidence
New peer macros for async conversion and completion handler generation
The MacroExamples implementation now includes three new peer macros: \AddAsyncMacro\ converts synchronous functions with completion handlers into async/await functions, handling both standard return values and \Result\ types; \AddCompletionHandlerMacro\ generates a synchronous completion-handler variant for existing async functions, including a fix-it to add the \async\ keyword if the target function is not already async; and \PeerValueWithSuffixNameMacro\ creates a peer variable suffixed with \\_peer\. These examples demonstrate how to manipulate function signatures, effect specifiers, and parameter lists within peer macro expansions.
Examples/Sources/MacroExamples/Implementation/Peer · high confidence
New refactoring actions for editing Swift Package Manifests
The SwiftRefactor library now provides a suite of \EditRefactoringProvider\ implementations for programmatically modifying \Package.swift\ manifests. These new capabilities allow tools to safely add package dependencies (\AddPackageDependency\), create new targets including macros with automatic swift-syntax dependency injection (\AddPackageTarget\), define products (\AddProduct\), attach plugin usages to targets (\AddPluginUsage\), add target-to-target dependencies (\AddTargetDependency\), and inject Swift compiler settings like language modes or upcoming/experimental features (\AddSwiftSetting\). All actions are exposed via the \PackageRefactor\ SPI and handle syntax generation, argument ordering, and duplicate detection.
Sources/SwiftRefactor/PackageManifest · high confidence
New test support library for diff-based assertions and string utilities
The new \\_SwiftSyntaxGenericTestSupport\ module provides test utilities for the SwiftSyntax project. It introduces \assertStringsEqualWithDiff\, which compares strings and produces Unix \diff\-style output (using \+\ and \–\ prefixes) to help identify discrepancies in test failures. It also adds a \trimmingTrailingWhitespace()\ extension to \String\ for cleaning up test data.
_Sources/\SwiftSyntaxGenericTestSupport · high confidence
New test support utilities for syntax tree comparison and incremental parsing
The \_SwiftSyntaxTestSupport module now includes new APIs to simplify testing Swift syntax trees. Users can now use emoji-based markers (e.g., 1️⃣, 2️⃣) in source strings to identify specific subtrees for structural comparison via the new SubtreeMatcher, replacing the previous \#^NAME^\# syntax. Additionally, assertIncrementalParse has been added to verify the correctness of incremental parsing, including round-trip fidelity and node reuse. The module also provides assertStringsEqualWithDiff and assertDataEqualWithDiff for detailed diff output on string and data mismatches, and a debugInitCall method on SyntaxProtocol to generate Swift expressions for reconstructing syntax trees, primarily for debugger use.
_Sources/\SwiftSyntaxTestSupport · high confidence
SwiftSyntaxBuilder is now a standalone, buildable module
The SwiftSyntaxBuilder library is now a distinct module with its own CMake build definition (Sources/SwiftSyntaxBuilder/CMakeLists.txt), allowing it to be built and linked independently. This change introduces a new public API surface for constructing syntax trees via result builders and string interpolation, including the ListBuilder protocol, convenience initializers for common nodes (like ArrayExprSyntax and FunctionCallExprSyntax), and the ability to parse declaration strings into typed syntax nodes (DeclSyntaxParseable). It also deprecates the legacy Indenter class in favor of SyntaxProtocol.indented(by:).
Sources/SwiftSyntaxBuilder · high confidence
Architecture
Lexer refactored into a modular, state-stack-based architecture
The SwiftParser lexer has been restructured from a single monolithic file into a modular package (Cursor, Lexeme, LexemeSequence, Lexer, RegexLiteralLexer, UnicodeScalarExtensions) that models lexer state using an explicit stack. This change introduces a peek-based cursor for efficient lookahead, separates regex literal lexing into its own component, and adds comprehensive diagnostics for invalid characters, escape sequences, and string/regex delimiters, resulting in more robust error reporting and improved performance for incremental parsing.
Sources/SwiftParser/Lexer · high confidence
New SwiftSyntaxMacroExpansion module for macro expansion logic
The \SwiftSyntaxMacroExpansion\ module has been introduced to centralize macro expansion implementation details. This includes a new \BasicMacroExpansionContext\ that supports build configurations and lexical context tracking, a \MacroSystem\ for orchestrating expansions, and utilities for handling indentation, macro arguments, and replacement logic. This refactoring separates the core expansion engine from the macro definition protocols, providing a more structured foundation for both compiler and testing use cases.
Sources/SwiftSyntaxMacroExpansion · high confidence
Behavioural changes
Add Ctrl-C cancellation support to swift-syntax-dev-utils
The swift-syntax-dev-utils tool now supports graceful cancellation of subcommands via Ctrl-C. When a user interrupts the process, the tool detects the signal and terminates the running subprocess without printing an error message, providing a cleaner user experience during long-running build or test operations.
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils · high confidence
Add Windows-specific library loading shim for Swift library plugins
A new C shim library (\\_SwiftLibraryPluginProviderCShims\) has been added to provide Windows-specific support for loading dynamic libraries. This includes a \LoadLibrary.c\ implementation that wraps \LoadLibraryW\ and \GetLastError\ for use on Windows, along with the necessary CMake build configuration and module map to expose these functions to Swift code. This change enables the Swift library plugin provider to correctly load plugins on Windows without directly linking against \swiftWinSDK.dll\.
_Sources/\SwiftLibraryPluginProviderCShims · high confidence
Added SwiftSyntax-all aggregate target
A new Swift source file has been added to create a fake aggregate target that depends on all targets in the package, ensuring compatibility with the \swift build\ command which does not automatically generate a combined package target.
Sources/SwiftSyntax-all · high confidence
Categorize macro examples by interface type
The macro examples in the MacroExamples target have been reorganized into distinct files based on their interface category (Accessor, Complex, Declaration, Expression, Extension, MemberAttribute, Member, Peer, and SourceLocation). This change improves discoverability by grouping related macros such as \EnvironmentValue\, \Observable\, \stringify\, and \AddAsync\ into their respective interface files, rather than keeping them in a single monolithic example plugin.
Examples/Sources/MacroExamples/Interface · high confidence
Experimental lexical lookup scope system for Swift code
The \SwiftLexicalLookup\ module introduces a new, experimental scope-based architecture for unqualified name lookup, replacing the previous implementation with a hierarchy of \ScopeSyntax\ protocols. This change enables more precise lookup behavior by defining specific scopes for functions, generic parameters, nominal types, closures, and sequential code blocks (like \guard\ statements). Users of the experimental API can now rely on improved handling of generic parameter shadowing, correct ordering of names in sequential scopes, and proper scoping of \self\ and member lookups within type declarations.
Sources/SwiftLexicalLookup/Scopes · high confidence
Generated parser code updated for Swift 6 compatibility and new language features
The generated parser sources in Sources/SwiftParser/generated have been regenerated to support Swift 6 compilation, switching the SwiftSyntax import to public when compiling with compiler(\>=6). This update introduces a new LanguageFeatures option set to enable experimental parsing capabilities, including coroutine accessors (read/modify), borrow and mutate accessors, coroutine functions, and various other experimental syntaxes like reference bindings and trailing commas. It also adds a generated IsLexerClassified lookup to optimize keyword identification and updates token spec sets to include new accessor keywords (borrow, mutate) and rename token kinds (e.g., floatingLiteral to floatLiteral, eof to endOfFile).
Sources/SwiftParser/generated · high confidence
Introduce Swift-based build utility with subprocess management and CI integration
The \swift-syntax-dev-utils\ tool is now implemented in Swift, replacing the previous shell-based approach. This change introduces a new \common\ module that provides structured argument parsing for build options (such as toolchain selection, release mode, and treating warnings as errors), automatic toolchain discovery on macOS via \xcrun\, and robust subprocess execution with support for cancellation via Ctrl-C. Additionally, the utility now includes specific logic to build the \SwiftParserCLI\ and the \EditorExtension\ as part of the CI pipeline, and improves error reporting by printing environment variables and detailed output when subprocesses fail.
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common · high confidence
Migrate swift-syntax-dev-utils build and test commands to Swift
The SwiftSyntaxDevUtils commands (Build, Test, GenerateSourceCode, VerifySourceCode, LocalPrPrecheck) have been rewritten in Swift, replacing the previous shell-script implementation. This migration introduces dedicated executor structs for each command, standardizes toolchain discovery via xcrun on macOS, and updates the build process to explicitly build the EditorExtension with a temporary derived data path. The test command now runs SwiftSyntax, CodeGeneration, and Examples tests in sequence, while the verify command checks that generated source files match the repository and that .spi.yml is up-to-date with Package.swift.
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands · high confidence
Migrate syntax node definitions from .gyb templates to Swift-based code generation
The internal syntax node definitions (attributes, availability, declarations, expressions, generics, etc.) have been moved from \.gyb\ template files to native Swift source files within the \CodeGeneration/Sources/SyntaxSupport\ module. This change replaces the previous template-based approach with a structured, type-safe Swift model for defining syntax nodes, children, and traits. For users, this ensures that the generated SwiftSyntax API remains consistent and stable, while enabling more robust validation of node structures and documentation generation directly from the source definitions.
CodeGeneration/Sources/SyntaxSupport · high confidence
New formatting and buildable type utilities for generated Swift code
The CodeGeneration utility package now includes a dedicated \CodeGenerationFormat\ class that controls how generated Swift files are formatted, such as breaking long lists of array, dictionary, or function parameters onto separate lines and managing indentation for method calls. It also introduces \SyntaxBuildableType\ and related extensions to map syntax node kinds to the specific \Buildable\ and \ExpressibleAs\ types required by SwiftSyntaxBuilder, ensuring that generated code correctly implements the builder pattern. Additionally, a \CopyrightHeader\ utility standardizes the license header added to all generated source files.
CodeGeneration/Sources/Utils · high confidence
Redefinition of SwiftSyntaxMacros protocol interfaces and expansion signatures
The macro protocol definitions in this module have been updated to align with Swift 6 compiler requirements and new language features. Protocols now use \public import\ for Swift 6+ and adopt \SendableMetatype\ where applicable. Expansion signatures have changed: \MemberMacro\ now requires an \expansion\ method accepting a \conformingTo\ parameter for protocol conformances, \ExtensionMacro\ receives a list of protocols to conform to, \PeerMacro\ and \AccessorMacro\ use opaque parameter types, and \BodyMacro\ now supports closures. Additionally, \DeclarationMacro\ introduces properties to control attribute and modifier propagation, and \FormatMode\ is now \Sendable\.
Sources/SwiftSyntaxMacros/MacroProtocols · high confidence
Refactor code generation for SwiftSyntax node construction
The \generate-swift-syntax\ tool has been refactored to centralize and improve the generation of SwiftSyntax node initializers and visitor logic. This change introduces \ChildNodeChoices\ to unify handling of node type choices, replaces Grand Central Dispatch with Structured Concurrency to eliminate thread-safety risks in the \errors\ variable, and adds support for experimental language features via \@\_spi\ attributes. Users will see generated code that is more robust, better organized, and includes updated compatibility shims for renamed children and nodes.
CodeGeneration/Sources/generate-swift-syntax · high confidence
Refactor diagnostics code generation templates
The code generation templates for parser diagnostics have been reorganized into three distinct files: ChildNameForDiagnosticsFile, SyntaxKindNameForDiagnosticsFile, and TokenNameForDiagnosticsFile. This change separates the logic for generating child name mappings, syntax kind names, and token kind names, improving modularity and maintainability of the generated diagnostic code.
CodeGeneration/Sources/generate-swift-syntax/templates/swiftparserdiagnostics · high confidence
Refactor parser code generation to support experimental language features
The code generation templates for the Swift parser have been updated to introduce a \LanguageFeatures\ option set, replacing the previous \ExperimentalFeatures\ naming. This change enables the parser to conditionally parse new syntax, such as \\_borrowing x\ patterns when the \borrowingSwitch\ feature is enabled, by matching token spec sets against resolved keywords and applying feature guards. Additionally, the templates now generate an \isLexerClassified\ property to distinguish keywords that have transitioned from non-contextual identifiers, and centralize \import SwiftSyntax\ generation to improve build consistency.
CodeGeneration/Sources/generate-swift-syntax/templates/swiftparser · high confidence
Refactored RawSyntax internals with dedicated views and arena management
The internal representation of the raw syntax tree has been restructured to improve performance and memory safety. The monolithic RawSyntax implementation has been split into specialized components: RawSyntaxLayoutView for managing child nodes and RawSyntaxTokenView for token-specific data, exposing these as SPI. Memory management now relies on a BumpPtrAllocator within RawSyntaxArena, which handles allocation and internment of syntax text and nodes, while introducing a child-reference tracking mechanism to prevent retain cycles. Additionally, token diagnostics are now stored directly within the token payload (ParsedToken/MaterializedToken) rather than via a separate handler, and the system now explicitly tracks error and warning flags recursively through RecursiveRawSyntaxFlags.
Sources/SwiftSyntax/Raw · high confidence
Regenerated SwiftSyntax API with renamed nodes and properties
The generated SwiftSyntax API has been updated to reflect recent language changes and internal refactoring. Key behavioral changes include the renaming of \AccessorDeclSyntax.accessorKind\ to \accessorSpecifier\, \ActorDeclSyntax.identifier\ to \name\, and \ArrayExprSyntax.leftSquareBracket\ to \leftSquare\. The \Keyword\ enum has been expanded to include new language features such as \borrow\, \borrowing\, \consume\, \copy\, \discard\, \sending\, and \nonsending\. Additionally, the generated code now includes a compatibility layer (\RenamedChildrenCompatibility.swift\) to handle these renames gracefully for existing users.
Sources/SwiftSyntax/generated · high confidence
Regenerated SwiftSyntaxBuilder API with renamed children and updated builders
The generated SwiftSyntaxBuilder sources have been regenerated, introducing behavioral changes to syntax node initializers and result builders. Many convenience initializers now use updated parameter names (e.g., \name\ instead of \identifier\, \accessorSpecifier\ instead of \accessorKind\, \leftSquare\/\rightSquare\ instead of \leftSquareBracket\/\rightSquareBracket\) to align with the underlying syntax model. To maintain compatibility, the new \RenamedChildrenBuilderCompatibility.swift\ file provides deprecated initializers that map old parameter names to the new ones, guiding users to the updated API via deprecation messages. Additionally, the generated result builders (e.g., \CodeBlockItemListBuilder\, \AttributeListBuilder\) and string interpolation conformances have been updated to reflect these structural changes.
Sources/SwiftSyntaxBuilder/generated · high confidence
Regenerated raw syntax node definitions for SwiftSyntax
The raw syntax node definitions in Sources/SwiftSyntax/generated/raw have been regenerated to reflect recent language changes. This update introduces new node types such as RawABIAttributeArgumentsSyntax, RawEditorPlaceholderDeclSyntax, and RawThenStmtSyntax, while also refining existing structures like Raw\_CanImportExprSyntax to support version info and RawDeclModifierListSyntax to ensure non-optional children. These changes ensure the syntax tree accurately models the latest Swift language features and structural requirements.
Sources/SwiftSyntax/generated/raw · high confidence
Regenerated syntax node definitions for new Swift language features
The generated syntax node files in Sources/SwiftSyntax/generated/syntaxNodes have been updated to reflect recent Swift language evolution. This includes new nodes such as ABIAttributeArgumentsSyntax for the @abi attribute, \_CanImportExprSyntax for parsing \#if canImport as a function call, and EditorPlaceholderDeclSyntax for editor placeholders. The DeclModifierSyntax node now supports additional modifiers like borrowing, sending, and yielding, while KeyPathComponentSyntax includes experimental support for method components in key paths. These changes ensure the syntax tree accurately represents the latest Swift syntax constructs.
Sources/SwiftSyntax/generated/syntaxNodes · high confidence
SwiftParserDiagnostics module extraction and enhanced diagnostic coverage
The diagnostic logic has been extracted from the main parser into a dedicated \SwiftParserDiagnostics\ module, establishing a clear separation between parsing and error reporting. This change introduces a comprehensive suite of new diagnostics for previously unhandled or poorly diagnosed syntax errors, including missing expressions in for-each loops, invalid characters in raw identifiers, source conflict markers, and specific issues with multi-line string literal indentation and escape sequences. It also adds new Fix-Its for correcting whitespace around assignment operators and handling missing tokens in unexpected node contexts, providing users with more precise and actionable error messages during development.
Sources/SwiftParserDiagnostics · high confidence
SwiftSyntax code generation templates refactored and expanded
The code generation templates in the swiftsyntax module have been significantly restructured and expanded. New templates were introduced to generate \SyntaxEnum\ for exhaustive node switching, \RawSyntaxValidation\ logic for layout integrity checks, and \RenamedChildrenCompatibility\ layers to handle deprecated API transitions. Existing templates were updated to improve keyword lookup performance by switching to integer-based byte packing, enhance \SyntaxAnyVisitor\ with generic visitation support, and refine base node casting methods to provide safer, hierarchy-specific type checks while deprecating cross-hierarchy casts.
CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax · high confidence
SwiftSyntax module restructured with new core types and APIs
The SwiftSyntax module has been significantly reorganized and expanded. New foundational types have been introduced, including \AbsolutePosition\ for tracking UTF-8 offsets, \SourceLength\ for measuring byte spans, and \Identifier\ for handling canonicalized identifier names (stripping backticks and normalizing dollar identifiers). The module now supports editor placeholders via \RawEditorPlaceholderData\, allowing detection and parsing of placeholder syntax. Internal performance and memory management have been improved with the addition of \BumpPtrAllocator\ and \ArenaAllocatedBufferPointer\. Additionally, convenience properties like \introducer\ have been added to declaration types (e.g., \ClassDeclSyntax\, \StructDeclSyntax\), and \SourceEdit\ now uses \AbsolutePosition\ ranges instead of deprecated byte ranges. The build system (CMake) has been updated to include these new files and manage dependencies like \\_SwiftSyntaxCShims\ more flexibly.
Sources/SwiftSyntax · high confidence
Updated SwiftSyntaxBuilder code generation for Swift 6 compatibility
The code generation templates in the swiftsyntaxbuilder module have been updated to ensure generated SwiftSyntaxBuilder code builds correctly in Swift 6 mode. This includes adding explicit access levels to imports, using fully-qualified types instead of \@retroactive\ conformances, and implementing workarounds for Swift 6.2 retroactive conformance bugs by restating implicit string interpolation conformances within \\#if compiler(\>=6)\ blocks. Additionally, the generator now aligns with the new ListBuilder protocol and centralizes import generation.
CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntaxbuilder · high confidence
Updated assertMacroExpansion to support macro conformances and Swift Testing integration
The \assertMacroExpansion\ function in \SwiftSyntaxMacrosTestSupport\ now accepts a \macroSpecs\ parameter, allowing tests to specify macro conformances (e.g., \Decodable\, \Encodable\) alongside the macro type. It also supports verifying the source code after Fix-Its are applied via the \fixedSource\ parameter. Additionally, the assertion logic now records issues using Swift Testing's \Issue.record()\ when available, while maintaining compatibility with XCTest for older toolchains (pre-6.4).
Sources/SwiftSyntaxMacrosTestSupport · high confidence
Updated diagnostic naming for Swift syntax nodes and tokens
The diagnostic messages generated by the parser now use updated, more consistent names for syntax nodes and tokens. This change reflects recent renames in the SwiftSyntax tree (such as splitting effect specifiers and renaming child nodes) and ensures that error and warning messages accurately describe the specific syntax elements involved, improving clarity for developers debugging code.
Sources/SwiftParserDiagnostics/generated · high confidence
macOS-only instruction execution counter in swift-parser-cli
The \swift-parser-cli\ tool now reports the number of instructions executed since process launch, but this feature is restricted to macOS. The underlying \\_InstructionCounter\ library uses macOS-specific APIs (\libproc.h\, \rusage\_info\_v4\) to retrieve this data; on all other platforms, the counter returns zero.
_Sources/\InstructionCounter · high confidence
Test coverage
Add automated validation tests for syntax node structure and naming; Added XCTest-based test suite for SwiftIDEUtils; Added comprehensive test suite for SwiftSyntax core components; Added empty test file for Dummy example; Added instruction-count performance tests for SwiftSyntax components; Added parser test coverage for Swift language features; Added parser test suite for do expressions and then statements; Added performance test input for SwiftSyntax SyntaxVisitor; Added test coverage for SwiftBasicFormat; Added test coverage for diagnostic formatting and grouped diagnostics; Added tests for ANSI and Basic diagnostic decorators; Added tests for EquatableExtensionMacro and DefaultFatalErrorImplementationMacro; Added tests for FuncUniqueMacro expansion; Added tests for Swift warning group control; Added tests for SwiftIfConfig active region evaluation and visitors; Added tests for SwiftRefactor capabilities; Added tests for SwiftSyntaxBuilder; Added tests for incremental parsing utilities and syntax comparison; Added tests for macro expansion assertion highlighting; Added tests for operator precedence folding and syntax synthesis; Added tests for the EnvironmentValue macro; Added unit tests for Peer macro examples; Added unit tests for SwiftSyntaxMacroExpansion macro types; Added unit tests for compiler plugin, JSON handling, and LRU cache; Added unit tests for complex macro implementations; Added unit tests for member macros; New test harness and assertions for SwiftLexicalLookup.
Dependencies
SwiftSyntax 604.0.0 release with modularized architecture and new tooling
This release bumps the version to 604.0.0 and restructures the library into a modular architecture with distinct packages for parsing, diagnostics, macros, and code generation. Key additions include the \SwiftParserCLI\ executable for command-line parsing and macro expansion, a dedicated \CodeGeneration\ tool for building syntax nodes, and expanded macro support via \SwiftSyntaxMacros\ and \SwiftSyntaxMacroExpansion\. The release also introduces new libraries such as \SwiftIfConfig\ for evaluating \\#if\ conditions, \SwiftWarningControl\ for lexical warning settings, and \SwiftLexicalLookup\ for scope handling, while removing legacy \gyb\-generated code and the \SwiftSyntaxParser\ module.
(dependencies) · high confidence
Housekeeping
Add documentation for SwiftLexicalLookup unqualified name lookup
Added DocC documentation for the SwiftLexicalLookup library, including an overview of its capabilities for performing lexical queries on Swift syntax trees and a detailed guide on unqualified lookup rules. The new articles explain how the library traverses the syntax tree to resolve names, covering scope behaviors, name kinds (identifiers, declarations, implicit names), and specific scope implementations like type scopes, sequential scopes, and generic parameter scopes.
Sources/SwiftLexicalLookup/SwiftLexicalLookup.docc · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 64 → 60 (-4.4)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 87 → 84 (-3.1)
- Architecture 97 → 94 (-2.8)
- Maturity 64 → 64 (-0.3)
- Readiness 71 → 63 (-8.3)
- Security 53 → 53 (+0.0)
- Performance 61 (new)
Resolved (9)
- Duplicated block (5 lines × 2) (Sources/SwiftParser/Attributes.swift)
- Hotspot: Sources/SwiftParser/TokenPrecedence.swift (Sources/SwiftParser/TokenPrecedence.swift)
- Hotspot: Sources/SwiftParser/TriviaParser.swift (Sources/SwiftParser/TriviaParser.swift)
- Hotspot: Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift (Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift)
- No direct assertions: testDeclScopeUsingIgnored (Tests/SwiftWarningControlTest/WarningControlTests.swift)
- No direct assertions: testFileScopeUsingWarningGroupControl (Tests/SwiftWarningControlTest/WarningControlTests.swift)
- Off-boarding risk: anonymized user #1
- Off-boarding risk: anonymized user #2
- Off-boarding risk: anonymized user #3
New (89)
- Coverage not measured — Swift suite
- Cursor.lexCarriageReturn (cognitive 16) (Sources/SwiftParser/TriviaParser.swift)
- DeclGroupLookup.swift._visitDirectMembersOfDecl (cognitive 24) (Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift)
- Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
- Duplicated block (11 lines × 2) (Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift)
- Duplicated block (11 lines × 2) (Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift)
- Duplicated block (11–12 lines × 2) (Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift)
- Duplicated block (12–13 lines × 3) (Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift)
- Duplicated block (16 lines × 2) (Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift)
- Duplicated block (17–25 lines × 2) (Sources/SwiftIfConfig/IfConfigEvaluation.swift)
- Duplicated block (24 lines × 2) (Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift)
- Duplicated block (24 lines × 2) (Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift)
- Duplicated block (28–29 lines × 2) (Sources/SwiftParser/Lexer/Cursor.swift)
- Duplicated block (32 lines × 2) (CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift)
- Duplicated block (38 lines × 2) (Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift)
- Duplicated block (5 lines × 2) (Sources/SwiftParser/Lexer/Cursor.swift)
- Duplicated block (5 lines × 2) (Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift)
- Duplicated block (7 lines × 2) (Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift)
- Duplicated block (7 lines × 2) (Sources/SwiftParser/Lexer/Cursor.swift)
- Duplicated block (7 lines × 2) (Sources/SwiftRefactor/PackageManifest/StringUtils.swift)
- …and 69 more
Changes since last survey
- 27 commits — 27 feature/other, 0 fixes
By area
- (repo) — 15 commits
- Sources/SwiftDiagnostics — 4 commits
- Sources/SwiftParser — 2 commits
- Tests/SwiftParserTest — 2 commits
- .github/CODEOWNERS — 1 commit
- CodeGeneration/Sources — 1 commit
- Sources/SwiftSyntax — 1 commit
- Tests/PerformanceTest — 1 commit
Notable commits
- change: Add @_spi(Compiler) annotations
- change: Add @_spi(Compiler) annotations
- change: Allow a MessageID's domain and id to be read
- change: Allow a MessageID's domain and id to be read (#3445)
- change: Allow the diagnostics in GroupedDiagnostics to be read back (#3441)
- change: Allow the diagnostics in a GroupedDiagnostics to be read back
- change: CodeOwner: add myself as code owner
- change: Measure reading a tree the way AST generation reads one
- change: Merge pull request #3420 from rintaro/perf-parser-11-keyword-specsets
- change: Merge pull request #3421 from Hokila/issue-3397-lookahead-ranges
- change: Merge pull request #3425 from rintaro/perf-parser-09-state-allocator
- change: Merge pull request #3427 from rintaro/perf-parser-31-string-literal-run
- change: Merge pull request #3432 from artemcm/ConditionalControlFileLevelWarnings
- change: Merge pull request #3434 from rintaro/perf-parser-28-lookahead-skip
- change: Merge pull request #3435 from rintaro/perf-parser-29-specset-allcases
- change: Merge pull request #3437 from rintaro/perf-parser-22-accessor-benchmark
- change: Merge pull request #3439 from a-viv-a/SE-0478-update-to-default-syntax
- change: Merge pull request #3442 from nkcsgexi/code-owner
- change: Merge pull request #3446 from a-viv-a/move-file-default-tests
- change: Merge pull request #3448 from rintaro/perf-parser-03-diagnostic-combine
- …and 7 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
swiftlang/swift-syntax was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 9d2fad17743c8c062e4e4380b0987b01380e16f6 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.