awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
apple avatar

apple/swift-syntax

0
View on GitHub↗
3,671 stars·525 forks·Swift·Apache-2.0·18 views

Swift Syntax

swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate abstract syntax tree representation of Swift code, acting as a parser, transformer, and code generator.

The project serves as the infrastructure for Swift macro development, enabling the expansion and transformation of source code during compilation. It is used to build compiler tooling for static analysis, formatting, and automated refactoring.

The system covers a broad range of source analysis capabilities, including the ability to convert source code into structured trees for inspection and the ability to programmatically modify those trees to generate updated source files.

Features

  • Source Code Analysis Tools - Provides a comprehensive parser to convert Swift source code into structured trees for programmatic analysis.
  • Swift Source Code Transformers - Provides the primary infrastructure for programmatically modifying and transforming Swift source code via a source-accurate syntax tree.
  • Swift Code Generators - Converts structured tree representations into plain text files to generate valid Swift source code.
  • Macro Expansion Frameworks - Acts as the underlying infrastructure for parsing and expanding Swift macros through structural source transformation.
  • Source Code Abstract Syntax Trees - Provides a source-accurate abstract syntax tree that maps every character and token for precise reconstruction.
  • Source Code Transformation Engines - Transforms Swift source code by manipulating the abstract syntax tree to generate updated files.
  • Source Code Generators - Programmatically generates source-accurate tree representations of code for insertion into existing Swift files.
  • Swift Source Analysis - Parses Swift code into structured trees to enable programmatic inspection of the program's logic and structure.
  • Swift Source Parsers - Provides a library for converting Swift source code into a structured tree for programmatic analysis.
  • Lossless Semantic Trees - Provides a lossless semantic tree that preserves all whitespace and comments for exact source code reconstruction.
  • Recursive Descent Parsers - Employs recursive descent parsing to organize Swift source code into a hierarchical structure of expressions and statements.
  • Swift Refactoring Tools - Enables automated refactoring of Swift source code by modifying its structure programmatically.
  • C-Based Parsers - Implements a low-level C parser for high-efficiency conversion of Swift source text into an abstract syntax tree.
  • Lexical Tokenizers - Implements a lexical tokenizer to break raw Swift input strings into discrete tokens for the structural tree.
  • Swift Development Tooling - Serves as the foundation for building custom Swift tools for static analysis and code formatting.
  • Immutable Transformations - Uses an immutable node hierarchy to ensure thread safety and stable transformations during syntax tree manipulation.
  • Macro Development Tools - Official library for parsing and manipulating Swift source code.

Star history

Star history chart for apple/swift-syntaxStar history chart for apple/swift-syntax

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Swift Syntax

Similar open-source projects, ranked by how many features they share with Swift Syntax.
  • nikic/php-parsernikic avatar

    nikic/PHP-Parser

    17,437View on GitHub↗

    PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic manipulation. It functions as a parser, a code generator, and a static analysis framework. The project enables the programmatic construction of abstract syntax tree nodes through a fluent interface and provides the ability to transform these trees back into formatted source code. It includes a serializer that exports abstract syntax trees to JSON format and reconstructs them from strings. The toolset covers several capability areas, including namespace resolution, constant exp

    PHP
    View on GitHub↗17,437
  • dtolnay/syndtolnay avatar

    dtolnay/syn

    3,292View on GitHub↗

    syn is a Rust syntax tree parser and token stream converter. It serves as a toolkit for procedural macro development, providing a framework to parse Rust source code into structured syntax trees for analysis and transformation. The project enables the manipulation of Rust abstract syntax trees through specialized visitor and folder patterns for traversing and mutating nodes. It provides a bidirectional mapping that allows developers to convert token streams into structured trees and print those trees back into tokens for code generation. The library covers a broad range of syntax analysis ca

    Rustproc-macro
    View on GitHub↗3,292
  • google/google-java-formatgoogle avatar

    google/google-java-format

    6,145View on GitHub↗

    google-java-format is a Java code formatter and style enforcement tool. It reformats Java source code to adhere to a standardized style guide, ensuring consistent layout and indentation across entire projects or individual files. The project functions as a build pipeline linting tool for continuous integration workflows and as an IDE formatting plugin to replace native editor formatting. It can be embedded as a formatting library within code generation software to ensure machine-written output remains human-readable. The tool provides capabilities for reorganizing source code indentation and

    Java
    View on GitHub↗6,145
  • openrewrite/rewriteopenrewrite avatar

    openrewrite/rewrite

    3,312View on GitHub↗

    OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic tree parser to represent source code as type-aware trees that preserve original whitespace and formatting, enabling precise and deterministic modifications. The project utilizes a declarative refactoring pipeline where sequences of transformations are defined in YAML to resolve breaking changes and technical debt. It features type-aware pattern matching and cross-language model mapping to apply similar refactoring patterns across different programming languages. The framework

    Javaabstract-syntax-treeastcode-search
    View on GitHub↗3,312
See all 30 alternatives to Swift Syntax→

Frequently asked questions

What does apple/swift-syntax do?

swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate abstract syntax tree representation of Swift code, acting as a parser, transformer, and code generator.

What are the main features of apple/swift-syntax?

The main features of apple/swift-syntax are: Source Code Analysis Tools, Swift Source Code Transformers, Swift Code Generators, Macro Expansion Frameworks, Source Code Abstract Syntax Trees, Source Code Transformation Engines, Source Code Generators, Swift Source Analysis.

What are some open-source alternatives to apple/swift-syntax?

Open-source alternatives to apple/swift-syntax include: nikic/php-parser — PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic… dtolnay/syn — syn is a Rust syntax tree parser and token stream converter. It serves as a toolkit for procedural macro development,… google/google-java-format — google-java-format is a Java code formatter and style enforcement tool. It reformats Java source code to adhere to a… square/javapoet — JavaPoet is a source code generator and metaprogramming utility for the Java language. It functions as an abstract… openrewrite/rewrite — OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic… square/kotlinpoet — KotlinPoet is a Java-based API for programmatically creating and formatting Kotlin source files. It serves as a source…