31 रिपॉजिटरी
Tools for modifying and rewriting syntax trees to generate new code structures.
Distinct from Syntax Tree Construction: Focuses on the mutation and transformation of the tree nodes rather than the initial construction of the tree.
Explore 31 awesome GitHub repositories matching software engineering & architecture · Syntax Tree Transformers. Refine with filters or upvote what's useful.
This project is a unified toolchain for JavaScript and TypeScript development, providing a suite of specialized tools for bundling, parsing, linting, and formatting source code. The toolchain is implemented in Rust and utilizes a shared internal representation to allow multiple tools to operate on the same parsed source code. It employs a parallelized analysis pipeline and single-pass parsing with error recovery to process files across CPU cores. The suite covers several core capability areas, including static analysis for identifying programmatic errors, automated style standardization, and
Implements tools for modifying and rewriting syntax trees to perform linting and formatting tasks.
oxc is a high-performance JavaScript toolchain developed in Rust for parsing, transforming, and analyzing JavaScript and TypeScript source code. It provides a set of core utilities including a parser that converts code into an abstract syntax tree, a linter for identifying problematic patterns, a formatter for standardizing visual style, and a minifier for reducing production file sizes. The project focuses on high-performance execution through a system design that utilizes single-pass parsing, zero-copy string slicing, and parallel worker processing to handle large codebases. It further opti
Implements a biphasic system that separates syntax tree analysis from code generation to optimize transformation speed.
CoffeeScript is a source-to-source transpiler that transforms a concise high-level syntax into standard JavaScript. It enables the development of logic for web applications and server-side environments by converting source code into a format compatible with browsers and server runtimes. The project provides a workflow for rapid prototyping and script execution automation, allowing users to run source files through a compiler and execute the resulting code immediately without a manual build step. The tooling leverages lexical analysis and abstract syntax tree transformations to manipulate cod
Implements syntax tree transformers to rewrite language constructs into JavaScript.
Prepack is a build-time code evaluator and JavaScript bundle optimizer. It functions as a static analysis compiler that pre-evaluates static code and precalculates function results and global assignments during the build phase to accelerate startup times and reduce bundle size. The project specifically targets JSX optimization by processing syntax and node serialization to improve user interface rendering efficiency. It utilizes a partial evaluation engine and static execution analysis to replace runtime computations with precalculated constants. The tool covers a range of capabilities inclu
Implements syntax tree transformations to inline expressions and strip type annotations during the build process.
YAPF एक पायथन कोड फ़ॉर्मेटर और स्टाइल अनुपालन टूल है। यह एक AST-आधारित रिफ़ॉर्मेटर के रूप में कार्य करता है जो स्रोत फ़ाइलों में संरचनात्मक स्थिरता और एक समान दृश्य प्रस्तुति सुनिश्चित करने के लिए कंक्रीट सिंटैक्स ट्री का उपयोग करता है। इंजन विभिन्न स्वरूपण विकल्पों के लिए संख्यात्मक लागत की गणना करके सर्वोत्तम लाइन ब्रेक निर्धारित करने के लिए दंड-आधारित लेआउट ऑप्टिमाइज़र का उपयोग करता है। यह कई फ़ाइलों के स्वरूपण को कई CPU कोर में वितरित करने के लिए एक मल्टी-प्रोसेस कोड प्रोसेसर का उपयोग करता है। टूल इन-प्लेस फ़ाइल संशोधनों, अंतर विश्लेषण और आंशिक कोड टुकड़ों के प्रसंस्करण के माध्यम से स्रोत कोड रिफ़ॉर्मेटिंग को कवर करता है। इसमें स्टाइल प्रीसेट, लेआउट नियमों और प्रोजेक्ट-स्तरीय सेटिंग्स को प्रबंधित करने के लिए एक नियम-आधारित कॉन्फ़िगरेशन सिस्टम शामिल है। एकीकरण क्षमताओं में निरंतर एकीकरण पाइपलाइनों के लिए स्टाइल अनुपालन सत्यापन, git हुक ऑटोमेशन, और एडिटर-आधारित फॉर्मेट-ऑन-सेव कार्यक्षमता शामिल है।
Reconstructs source code by modifying concrete syntax tree representations while preserving the original structural integrity.
AST Explorer सोर्स कोड को एब्स्ट्रैक्ट सिंटैक्स ट्री (AST) में पार्स करने और परिणामी ट्री संरचना को विज़ुअलाइज़ करने के लिए एक वेब-आधारित टूल है। यह एक कोड इंस्पेक्टर और ट्रांसफॉर्मेशन प्लेग्राउंड के रूप में कार्य करता है, जो उपयोगकर्ताओं को एक इंटरैक्टिव ब्राउज़र इंटरफेस के माध्यम से विभिन्न प्रोग्रामिंग भाषाओं के संरचनात्मक प्रतिनिधित्व का पता लगाने की अनुमति देता है। यह टूल एक ट्रांसफॉर्मेशन वातावरण प्रदान करता है जहां उपयोगकर्ता कोड संशोधन लॉजिक का परीक्षण करने के लिए पार्स किए गए ट्री पर संशोधन नियम लागू कर सकते हैं। इसमें द्वि-दिशात्मक मैपिंग की सुविधा है जो एडिटर में कर्सर के चलते ही मिलान करने वाले ट्री नोड्स और सोर्स टेक्स्ट को एक साथ हाइलाइट करती है। प्लेटफॉर्म फ़ाइल अपलोड या ड्रैग-एंड-ड्रॉप इंटरफेस के माध्यम से कोड आयात करने का समर्थन करता है और स्टेट-एन्कोडेड URL के माध्यम से विशिष्ट कोड राज्यों और पार्सर कॉन्फ़िगरेशन को साझा करने की अनुमति देता है।
Provides a pipeline for applying modification functions to a syntax tree to rewrite the underlying code.
SWIG is a tool that generates wrapper code to expose C and C++ libraries to a wide range of higher-level programming languages. It reads annotated C/C++ header files and produces language-specific bindings from a single interface definition, supporting languages such as Python, Java, Ruby, C#, Perl, and many others. The generated wrapper code is free from the project's GPL license, allowing users to distribute it under their own terms. The tool handles modern C++ features including templates, namespaces, smart pointers, and constructs up to C++20 through specialized parsing and code generatio
Builds an internal parse tree from C/C++ source and transforms it into target language bindings.
ts-morph is a TypeScript AST manipulation library and a high-level wrapper for the TypeScript compiler API. It provides a programmatic interface for analyzing, modifying, and generating TypeScript source code, serving as a tool for automated code refactoring and source code generation. The library simplifies the process of navigating and inspecting project structures by offering an object-oriented abstraction over the underlying compiler API. It allows for the programmatic transformation of existing codebases to automate structural updates and bulk code migrations. Its capabilities cover sta
Provides tools for modifying and rewriting TypeScript syntax trees to generate new code structures.
Lark एक Python पार्सिंग टूलकिट है जिसका उपयोग ग्रामर को परिभाषित करने और रॉ टेक्स्ट को एनोटेटेड पार्स ट्रीज़ में बदलने के लिए किया जाता है। यह एक एब्सट्रैक्ट सिंटैक्स ट्री जनरेटर और ग्रामर डेफिनेशन भाषा के रूप में कार्य करता है, जो टर्मिनल्स और रेगुलर एक्सप्रेशंस के माध्यम से भाषा के नियमों को निर्दिष्ट करता है। यह लाइब्रेरी दो प्राथमिक पार्सिंग इम्प्लीमेंटेशन प्रदान करती है: एक Earley पार्सिंग लाइब्रेरी जो एम्बिग्युटी और लेफ्ट-रिकर्शन सहित सभी कॉन्टेक्स्ट-फ्री भाषाओं को संभालने में सक्षम है, और एक हाई-परफॉरमेंस LALR पार्सिंग लाइब्रेरी जिसे कम मेमोरी ओवरहेड वाली डिटरमिनिस्टिक भाषाओं के लिए डिज़ाइन किया गया है।
Uses a visitor-pattern mechanism to transform parse trees into custom data structures via specific grammar branch mappings.
ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript files. It functions as a code migration framework that uses abstract syntax trees to perform large-scale refactoring and structural changes across a project. The tool provides a customizable framework for defining plugin-based transformation rules, allowing for the automation of specific code changes. It includes specialized engines for converting JSDoc type definitions into native TypeScript annotations and a utility for suppressing compiler errors by inserting type assertions or
Modifies syntax trees to reorganize class members and apply accessibility modifiers.
Hy Python के लिए एक Lisp कार्यान्वयन है जो Lisp सिंटैक्स लिखने की अनुमति देता है जो Python बाइटकोड में संकलित (compile) होता है। यह एक Python-आधारित Lisp डायलेक्ट और S-एक्सप्रेशन भाषा के रूप में कार्य करता है, जो Python स्टैंडर्ड लाइब्रेरी और इकोसिस्टम तक पूर्ण पहुंच प्रदान करता है। यह भाषा मैक्रो-आधारित मेटाप्रोग्रामिंग पर केंद्रित है, जिसमें एक AST-वॉकिंग मैक्रो सिस्टम और रीडर मैक्रोज़ शामिल हैं जो कस्टम सिंटैक्स ट्रांसफॉर्मेशन और पार्सिंग नियमों की अनुमति देते हैं। यह भाषा क्षमताओं का विस्तार करने के लिए एब्सट्रैक्ट सिंटैक्स ट्री के हेरफेर को सक्षम बनाता है। इस प्रोजेक्ट में इंटरैक्टिव डेवलपमेंट के लिए एक read-eval-print लूप शामिल है और यह स्टैंडअलोन स्क्रिप्ट निष्पादन का समर्थन करता है। यह स्ट्रक्चरल पैटर्न मैचिंग और async व await कंस्ट्रक्ट्स का उपयोग करके एसिंक्रोनस प्रोग्राम डेवलपमेंट जैसी फंक्शनल प्रोग्रामिंग क्षमताओं को कवर करता है। सोर्स कोड को निरीक्षण या वितरण के लिए समकक्ष Python सोर्स फाइलों में अनुवादित किया जा सकता है।
Provides a macro system for creating custom syntax transformations that modify the abstract syntax tree.
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
Provides tools for modifying and rewriting syntax trees to perform complex code transformations.
Poi is an extensible, zero-configuration module bundler and asset compiler for modern frontend development. It functions as a build system that transforms JavaScript, JSX, and CSS into browser-compatible files and combines them into single packages for web delivery. The tool is built around a plugin architecture that allows for custom extensions to the build pipeline and the addition of specialized asset processing logic. It employs a convention-based mapping system to automate build settings and target outputs without the need for manual configuration files. The project covers a broad range
Implements syntax tree transformations to enable programmatic modification and framework-specific compilation of source code.
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
Runs sequences of plugins to modify or analyze syntax trees before serialization.
TSDoc TypeScript कोड में संरचित टिप्पणियाँ लिखने के लिए एक दस्तावेज़ीकरण मानक और विनिर्देश है। यह विभिन्न टूलिंग में सुसंगत पार्सिंग और रेंडरिंग सुनिश्चित करने के लिए सोर्स कोड के भीतर मेटाडेटा, टैग्स और क्रॉस-रेफरेंस को परिभाषित करने के लिए एक पोर्टेबल सिस्टम प्रदान करता है। इस प्रोजेक्ट में एक डॉक कमेंट पार्सर शामिल है जो टिप्पणियों को एक संरचित सिंटैक्स ट्री में परिवर्तित करता है और एक वैलिडेटर जो सिंटैक्स स्थिरता को लागू करता है। यह बाहरी कॉन्फ़िगरेशन फ़ाइलों के माध्यम से कस्टम दस्तावेज़ीकरण टैग्स की परिभाषा की अनुमति देता है और विनिर्देश अनुपालन में सहायता के लिए कई सिंटैक्स वैलिडेशन मोड्स का समर्थन करता है। यह विनिर्देश API दस्तावेज़ीकरण की आवश्यकताओं की एक विस्तृत श्रृंखला को कवर करता है, जिसमें रिलीज़ चरणों, स्थिरता और अवमूल्यन को चिह्नित करना शामिल है। यह फ़ंक्शन पैरामीटर्स, रिटर्न मानों और अपवाद प्रकारों का विवरण देने के साथ-साथ आंतरिक दृश्यता, इनहेरिटेंस और घोषणाओं के बीच क्रॉस-रेफरेंसिंग को मैनेज करने का समर्थन करता है।
Converts structured syntax trees back into plain text comments to allow for automated modification of source code.
Lost एक CSS ग्रिड सिस्टम और PostCSS प्लगइन है जिसे रिस्पॉन्सिव स्क्रीन डिज़ाइन के लिए गणितीय गणनाओं का उपयोग करके कॉलम की चौड़ाई और स्थिति को परिभाषित करने के लिए डिज़ाइन किया गया है। यह एक बिल्ड-टाइम टूल के रूप में कार्य करता है जो कस्टम ग्रिड नियमों को ब्राउज़र-संगत CSS लेआउट में संसाधित करता है। यह फ्रेमवर्क गैर-मानक लेआउट घोषणाओं को नेटिव CSS ग्रिड और Flexbox गुणों में बदल देता है। यह सटीक निर्देशांक और कॉलम चौड़ाई की गणना करने के लिए एक PostCSS-आधारित पाइपलाइन का उपयोग करता है, यह सुनिश्चित करते हुए कि परिणामी शैलियाँ मानक वेब ब्राउज़र के साथ संगत हैं। यह प्रोजेक्ट एक प्रीप्रोसेसर-अज्ञेयवादी मिडलवेयर लेयर के रूप में संचालित होता है, जो इसे शैलियों को संसाधित करने की अनुमति देता है, चाहे स्रोत सादा CSS, Sass, या Less हो। यह रिस्पॉन्सिव ग्रिड संरचनाओं के निर्माण को स्वचालित करता है जो स्क्रीन आयामों के आधार पर तत्व के आकार और स्थिति को समायोजित करते हैं।
Implements a PostCSS-based transformation of the CSS abstract syntax tree to modify layout properties.
Myth एक CSS बिल्ड टूल और प्रीप्रोसेसर है जो आधुनिक स्टाइलिंग विनिर्देशों और भविष्य के सिंटैक्स को वर्तमान वेब ब्राउज़र के लिए संगत कोड में बदल देता है। यह एक पॉलीफ़िल टूल के रूप में कार्य करता है, जो सुसंगत क्रॉस-ब्राउज़र रेंडरिंग सुनिश्चित करने के लिए उन्नत सुविधाओं को मानक CSS में परिवर्तित करता है। यह प्रोजेक्ट ब्राउज़र समर्थन डेटा के आधार पर ऑटोमेटेड वेंडर प्रीफ़िक्सिंग प्रदान करता है और लेगेसी ब्राउज़र संगतता के लिए CSS वेरिएबल्स को स्थिर मानों में हल करता है। यह कस्टम मीडिया क्वेरी उपनामों के ट्रांसपाइलेशन और उन्नत रंग कार्यों को मानक फ़ॉर्मेट में हेरफेर करने को भी संभालता है। टूलसेट में स्टाइलशीट संकलन के लिए एक कमांड लाइन इंटरफ़ेस शामिल है, जिसमें मिनिफिकेशन के लिए आउटपुट कम्प्रेशन और डिबगिंग के लिए सोर्स मैप्स का निर्माण शामिल है। यह प्रोसेसिंग पाइपलाइन को स्वचालित करने के लिए बिल्ड-टाइम गणितीय गणनाओं और फ़ाइल परिवर्तन निगरानी का भी समर्थन करता है।
Uses an abstract syntax tree to transform modern CSS specifications into browser-compatible code.
pyupgrade Python के लिए एक स्टेटिक कोड मॉडर्नाइज़र और सिंटैक्स अपग्रेडर है। यह निर्दिष्ट लक्ष्य संस्करण के आधार पर आधुनिक भाषा सुविधाओं और सिंटैक्स को लागू करने के लिए स्वचालित रूप से सोर्स कोड को फिर से लिखता है। यह टूल तकनीकी ऋण (technical debt) को हटाने पर केंद्रित है, जिसमें डेप्रिकेटेड इम्पोर्ट्स, कम्पैटिबिलिटी शिम्स और अप्रचलित संस्करण-विशिष्ट कंडीशनल ब्लॉक्स को हटाना शामिल है। यह टाइप एनोटेशन को वर्तमान मानकों का उपयोग करने के लिए रिफैक्टर भी करता है, जैसे कि सरलीकृत जेनेरिक एलियास और यूनियन ऑपरेटर्स। इसकी क्षमता सतह में मानक लाइब्रेरी उपयोग को अपडेट करना, इन-बिल्ट फंक्शन कॉल्स को ऑप्टिमाइज़ करना, और वर्बोज़ कलेक्शन कंस्ट्रक्टर्स या स्ट्रिंग फॉर्मेटिंग को संक्षिप्त आधुनिक समकक्षों में बदलना शामिल है। ये रूपांतरण एक टारगेट-वर्शन्ड रूल इंजन के माध्यम से किए जाते हैं जो मूल फॉर्मेटिंग और टिप्पणियों को संरक्षित करते हैं।
Implements transformations on concrete syntax trees to ensure that original source formatting and comments are preserved during rewriting.
unplugin-auto-import is a build-time import automation plugin and AST-based code transformer. It analyzes source code to identify missing identifiers and automatically injects the required import statements during the bundling process. The project functions as a cross-bundler build plugin, providing a unified abstraction layer that ensures consistent behavior across Vite, Webpack, and Rollup. It utilizes a pattern-based module resolver to scan local directories via glob patterns and employs a TypeScript declaration generator to maintain type definition files for IDE autocompletion. Its capab
Parses source code into a structural tree to identify missing identifiers and inject import statements.
csso is a CSS minifier and optimizer that reduces stylesheet file sizes through structural analysis and algebraic transformations. It functions as an abstract syntax tree processor, converting styles into a structured tree to perform deep analysis and semantic-preserving code transformations while maintaining the original visual presentation. The project distinguishes itself through usage-aware optimization, analyzing external HTML markup and class identifiers to prune unused styles and reorganize rules based on actual document usage. It also performs structural refactoring by identifying and
Implements a transformation system that modifies the CSS abstract syntax tree to optimize style rules.