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
benjamn avatar

benjamn/ast-types

0
View on GitHub↗
1,172 stars·197 forks·TypeScript·MIT·16 views

Ast Types

This project is a framework for building, manipulating, and analyzing abstract syntax trees. It provides a toolkit for defining, traversing, and validating syntax trees that are compatible with the Mozilla Parser API, serving as a foundation for static code inspection and automated transformation tasks.

The library distinguishes itself through a declarative type system that enforces structural integrity across node hierarchies. By wrapping raw syntax nodes in context-aware objects, it enables developers to track parent relationships and ancestor chains without modifying the underlying tree structure. This system supports the registration of custom syntax types, allowing for the extension of standard hierarchies to accommodate non-standard language features.

The toolkit includes comprehensive utilities for navigating complex structures using visitor patterns, which facilitate both inspection and modification of code. It also provides integrated scope analysis to resolve variable bindings and lookup depths, alongside schema-driven validation to ensure that all nodes conform to predefined specifications.

Features

  • AST Manipulation Libraries - Provides a toolkit for defining, traversing, and validating Mozilla Parser API compatible syntax trees.
  • JavaScript AST Transformations - Automates code refactoring and transpilation tasks by traversing and modifying syntax tree nodes.
  • AST Variable Scope Analysis - Implements scope analysis to resolve variable bindings and lookup depths by identifying declarations within code blocks.
  • JavaScript Static Analyzers - Provides tools for inspecting and analyzing JavaScript source code by navigating its underlying syntax tree structure.
  • AST Visitor Patterns - Navigates complex tree structures using visitor patterns to enable code inspection and modification.
  • AST Context Analysis - Provides utilities for tracking ancestor chains and parent relationships within abstract syntax trees during traversal.
  • Language Extensions - Enables the definition of new syntax or language features by extending standard node hierarchies.
  • Tree Traversal - Supports syntax tree traversal using a visitor pattern to inspect, transform, or validate code structures.
  • Code Analysis Tools - Inspects variable scope and navigates nested code structures through visitor patterns and path-based node management.
  • Custom Node Definitions - Supports the registration of custom syntax types to extend standard hierarchies for non-standard language features.
  • Runtime Schema Validations - Ensures data integrity during tree construction and transformation by validating node structures against predefined type definitions.
  • Structured Type Declarations - Defines a formal schema for syntax nodes with support for property requirements and default values.
  • Syntax Tree Construction - Provides a framework for constructing and extending node hierarchies with declarative type definitions.
  • Syntax Tree Transformers - Ensures generated or modified code structures conform to language specifications by enforcing type hierarchies and property requirements.
  • Node Type Validators - Ensures syntax tree nodes conform to language specifications by enforcing required field types and default values.
  • Path-Based Node Selection - Wraps raw syntax nodes in context-aware objects to track parent relationships without mutating the original tree.

Star history

Star history chart for benjamn/ast-typesStar history chart for benjamn/ast-types

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 Ast Types

Similar open-source projects, ranked by how many features they share with Ast Types.
  • benjamn/recastbenjamn avatar

    benjamn/recast

    5,246View on GitHub↗

    Recast is a JavaScript AST parser and printer designed for automated code refactoring. It converts source code into abstract syntax trees that can be modified and then printed back into source code. The project focuses on formatting-preserving transformations, storing original whitespace and indentation metadata within syntax tree nodes to reconstruct code without losing its original layout. It also generates character-level source maps to maintain precise correspondences between original input and transformed output. The toolkit includes utilities for syntax tree manipulation using a visito

    TypeScript
    View on GitHub↗5,246
  • unifiedjs/unifiedunifiedjs avatar

    unifiedjs/unified

    4,999View on GitHub↗

    Unified is a syntax tree processing engine and content ecosystem designed to parse, transform, and serialize text content. It functions as a plugin-based content pipeline that converts raw text into structured abstract syntax trees using plain JavaScript objects for programmatic inspection and modification. The project distinguishes itself through a modular architecture that enables cross-ecosystem translation, allowing syntax trees to be converted between different specifications such as HTML and Markdown. It utilizes a system of immutable processor cloning and shared state containers, ensur

    JavaScriptastcstjavascript
    View on GitHub↗4,999
  • lunet-io/scribanlunet-io avatar

    lunet-io/scriban

    3,905View on GitHub↗

    Scriban is a .NET text templating engine and embedded scripting language used for dynamic text generation. It functions as an abstract syntax tree manipulation tool and a template parser, allowing for the conversion of scripts into visitable trees for analysis, modification, and rendering. The engine is specifically designed for Native AOT compatibility, utilizing a reflection-free API to execute templates in trimmed environments. It also provides a dedicated parser and conversion system for Liquid templates, enabling the migration and execution of Liquid scripts within .NET. The project cov

    C#
    View on GitHub↗3,905
  • jamiebuilds/babel-handbookjamiebuilds avatar

    jamiebuilds/babel-handbook

    12,110View on GitHub↗

    This project is a technical handbook and tutorial guide for the Babel compiler. It serves as a resource for configuring the tool and writing custom plugins to transform JavaScript source code. The guide provides instructional material on creating custom transformation plugins and modifying the compilation process. It specifically covers how to navigate and modify abstract syntax trees to programmatically rewrite source code. The documentation covers the mechanics of code transformation, the management of compiler configurations, and the fundamentals of compiler tooling. It includes guidance

    babelhandbook
    View on GitHub↗12,110
See all 30 alternatives to Ast Types→

Frequently asked questions

What does benjamn/ast-types do?

This project is a framework for building, manipulating, and analyzing abstract syntax trees. It provides a toolkit for defining, traversing, and validating syntax trees that are compatible with the Mozilla Parser API, serving as a foundation for static code inspection and automated transformation tasks.

What are the main features of benjamn/ast-types?

The main features of benjamn/ast-types are: AST Manipulation Libraries, JavaScript AST Transformations, AST Variable Scope Analysis, JavaScript Static Analyzers, AST Visitor Patterns, AST Context Analysis, Language Extensions, Tree Traversal.

What are some open-source alternatives to benjamn/ast-types?

Open-source alternatives to benjamn/ast-types include: benjamn/recast — Recast is a JavaScript AST parser and printer designed for automated code refactoring. It converts source code into… unifiedjs/unified — Unified is a syntax tree processing engine and content ecosystem designed to parse, transform, and serialize text… lunet-io/scriban — Scriban is a .NET text templating engine and embedded scripting language used for dynamic text generation. It… jamiebuilds/babel-handbook — This project is a technical handbook and tutorial guide for the Babel compiler. It serves as a resource for… dsherret/ts-morph — ts-morph is a TypeScript AST manipulation library and a high-level wrapper for the TypeScript compiler API. It… hylang/hy — Hy is a Lisp implementation for Python that allows for writing Lisp syntax which compiles to Python bytecode. It…

Curated searches featuring Ast Types

Hand-picked collections where Ast Types appears.
  • Signature mutation library