18 个仓库
Parsers specifically designed to convert JavaScript source code into structured data for analysis.
Distinct from Source Code Transformation Engines: Distinct from general transformation engines: focuses specifically on the initial parsing phase for the JavaScript language.
Explore 18 awesome GitHub repositories matching programming languages & runtimes · JavaScript Source Parsers. Refine with filters or upvote what's useful.
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 fast compiler frontend that converts JavaScript and TypeScript code into an abstract syntax tree.
UglifyJS2 is a suite of tools designed for parsing, beautifying, mangling, and minifying JavaScript code. It functions by converting source code into an abstract syntax tree to enable programmatic analysis and transformation, and it includes a dedicated generator for creating associated source maps. The project optimizes web production builds by compressing script logic and removing unreachable code. It utilizes name mangling to shorten variable and property names and implements a beautifier to reconstruct compressed scripts into a human-readable layout. The toolset covers broad capability a
Converts raw JavaScript source code into a structured data format for analysis and logic redistribution.
UglifyJS is a tool for JavaScript code minification, AST manipulation, and source beautification. Its primary purpose is to reduce the file size of JavaScript source code by removing whitespace and shortening variable names to optimize frontend build assets. The project differentiates itself through its ability to programmatically analyze and transform code using abstract syntax trees. It performs constant folding analysis and conditional compilation to eliminate unreachable or redundant code, and it employs a multi-pass compression pipeline to maximize total file size reduction. The tool pr
Includes specialized JavaScript source parsers to convert raw code into structured data.
Acorn is a JavaScript parser that converts source text into a structured abstract syntax tree. It follows the ESTree specification to produce a standardized JSON tree format, enabling consistent analysis of code structure and language versions. The project features a plugin-based grammar extension system that allows the base parser to be extended with custom rules for experimental or non-standard language features. It also includes syntax error recovery, which inserts placeholder nodes into the tree when encountering invalid code to allow parsing to continue. The toolset covers static analys
Provides a high-performance parser that converts JavaScript source code into structured ESTree-compliant data.
Terser is a JavaScript minifier and compressor designed to reduce file size through whitespace removal, symbol mangling, and logic optimization for ES6+. It functions as a toolkit for minification, a code mangler for shortening variable and property names, and a dead code eliminator that evaluates constant expressions to remove unreachable logic. The project operates as an AST toolkit that parses JavaScript source into SpiderMonkey AST format for structural analysis. It generates source maps to link compressed production code back to the original source, ensuring that minified bundles remain
Ships a specialized JavaScript source parser that converts code into a structured tree for optimization.
Otto is a Go implementation of a JavaScript interpreter and embedded scripting engine. It provides a runtime environment for executing JavaScript code within native applications and includes a parser that converts source code into an abstract syntax tree for analysis and processing. The project enables the creation of custom scripting interfaces by binding native Go functions into the JavaScript global scope. It also includes a utility to translate JavaScript regular expression patterns into compatible formats for other programming languages. The engine supports safe script sandboxing throug
Includes a parser that converts JavaScript source code into structured ASTs for program analysis.
Esprima 是一个 JavaScript 解析器,可将源代码转换为结构化的抽象语法树。它实现了规范驱动的语法以确保符合 ECMAScript 标准,从而能够对 JavaScript 程序进行编程分析和转换。 该项目提供词法分词功能,将源代码分解为单个符号,并提供静态语法验证,以在不执行代码的情况下验证脚本是否格式正确。 其功能涵盖 JavaScript 静态分析、词法分析以及抽象语法树的生成。
Provides lexical tokenization to break JavaScript source code into individual symbols.
js-code-to-svg-flowchart is a JavaScript source code visualizer and static code analysis tool that converts programming blocks and iterators into scalable vector graphics flowcharts. It functions as a code-to-diagram converter that maps the structural logic and sequence of operations from source files into visual representations. The system includes a command line interface for generating SVG flowcharts directly from local source code. It features a transformation engine that maps code nodes to schematic shapes and supports a sequence of images at varying abstraction levels to explain logic s
Transforms JavaScript source code into SVG flowcharts to visualize program logic and execution flow.
Boa is a high-performance JavaScript engine and parser designed to execute JavaScript code and analyze source code structure. It functions as a runtime environment for executing scripts to automate tasks or process data, providing both a command-line JavaScript interpreter and a tool for converting source code into abstract syntax trees. The engine is capable of compiling to WebAssembly, allowing the runtime to be deployed and executed within web browser environments. It includes an interactive read-eval-print loop for real-time logic testing and snippet execution via a terminal. The system
Provides a dedicated JavaScript parser that converts source code into detailed abstract syntax trees.
Metro is a JavaScript bundler designed for React Native environments. It functions as a system for resolving dependencies, transforming source code, and packaging JavaScript and assets into bundles for execution. The project includes a development bundler server that hosts assets via HTTP and provides hot module replacement. It features a module resolver that handles platform-specific file extensions and a source code transformer that converts code into tree structures for optimization and minification. The toolset covers programmatic bundle generation, source map creation, and file system c
Provides a transformation pipeline that converts source code into tree structures for optimization and minification.
go-ast-book 是一系列专注于抽象语法树(AST)分析、编译器开发和静态代码验证的教育和技术资源。它提供了解析、遍历和分析 Go 源代码以提取语义含义的指南和手册。 该项目作为构建编译器前端的参考,涵盖了将高级代码转换为中间表示和静态单赋值形式的过程。它还提供了使用这些技术开发语言工具和执行静态代码分析的说明。 这些资源涵盖了广泛的静态分析能力,包括词法标记化、表达式和声明的结构化解析,以及源文件的坐标跟踪。它还详细介绍了语义分析过程,如标识符解析、类型正确性验证,以及针对并发和延迟执行的控制流分析。
Breaks down source code into identifiers and operators to prepare text for structural analysis.
该库是一个 PHP 源代码词法分析器和静态分析工具,将原始 PHP 代码转换为离散的标记(token)和结构化的 XML 表示。它作为一个序列化器,将标记流转换为机器可读的格式,以便进行程序化分析和源代码树操作。 该项目使用基于流的 XML 序列化和基于片段的缓冲区写入,以在处理大文件时保持较低的内存开销。它允许自定义 XML 命名空间配置,以确保模式兼容性并避免转换过程中的命名冲突。 该工具包涵盖了词法分析和将源代码转换为结构化 XML 的功能,以支持静态代码分析工作流。它在单次传递中处理标记流,将扁平的源代码列表组织成层次化的 XML 结构。
Converts PHP source code into discrete tokens to enable programmatic analysis and processing.
CodeGen 是一个经过训练的大语言模型与程序合成模型,旨在生成功能性源代码。它利用神经网络架构,根据自然语言描述或部分代码片段合成可执行代码。 该模型通过预测并填充程序中缺失的代码部分,实现了自动化程序合成与 AI 辅助编码。它将自然语言描述转换为功能性编程逻辑,以自动化样板代码与业务逻辑的创建。
Converts source code into numerical representations using a specialized vocabulary optimized for programming language syntax.
browserify-handbook 是一份关于 Browserify 的综合文档指南,Browserify 是一个 CommonJS 模块打包器和 JavaScript 构建工具。它解释了如何将 Node.js 风格的模块编译为单个 JavaScript 文件,以便在 Web 浏览器中执行。 该指南涵盖了通用模块定义(UMD)包的生成,这些包可在 Node、AMD 和浏览器环境中运行。它还详细介绍了如何使用与浏览器兼容的 Polyfill 来处理 Node.js 内置模块,以确保跨平台兼容性。 该手册描述了源代码转换、前端构建自动化和 Web 应用调试的功能。它还涵盖了包大小优化、入口点拆分以及 Source Map 的生成。
Transforms JavaScript source code through compilation pipelines to support custom syntax or languages.
Sweet-core 是一个 JavaScript 源码到源码(source-to-source)的编译器和 Lisp 风格的宏系统。它作为一个语法转换器,通过允许在编译过程中定义自定义语法和运算符来扩展 JavaScript。 该系统提供了一个框架,用于通过卫生的(hygienic)、递归的宏展开和创建新的语言结构来构建领域特定语言(DSL)。它的独特之处在于支持具有可配置结合性和优先级的自定义运算符定义,以控制表达式的求值。 该编译器包含一个专门的模块系统,用于管理编译时依赖项和运行时辅助工具的集成。其内部架构涵盖了抽象语法树(AST)转换、语法生成匹配和语法对象生成,以确保词法卫生。 提供了一个命令行接口,用于将源文件转换为标准的 JavaScript 输出文件或目录。
Acts as a JavaScript source transformer that creates new language constructs and operators via macros.
这是一个抽象语法树(AST)转换工具套件,旨在自动化将源代码迁移到较新版本 React 的过程。它提供了一组脚本,以编程方式修改代码结构,用现代等效项替换已弃用的 API 和组件模式。 该工具包专门用于使用箭头函数和属性解构将类组件转换为函数组件。它还包括用于现代化 JSX 语法、将已弃用的生命周期方法更新为稳定版本以及将遗留的基于字符串的引用迁移到回调引用的实用程序。 其他功能涵盖了导入模式的优化、冗余导入的删除以及包引用和模块路径的更新。该项目使用规则驱动的源代码迁移和模式匹配语法分析,以确保转换在大型代码库中保持一致。
Provides tools for programmatically transforming JavaScript source code through AST manipulation pipelines.
This project is an AST-based code optimizer and compressor for modern ECMAScript, JSX, and TypeScript source code. It functions as a JavaScript minifier that uses the Babel toolchain to reduce file size by removing unnecessary characters and whitespace while preserving program logic. The tool is distinguished by its ability to process experimental language proposals and transform modern syntax into browser-compatible versions. It provides specialized handling for React JSX transpilation and strips type annotations from TypeScript files to produce compressed production assets. The system cove
Converts JavaScript and TypeScript source files into structured abstract syntax trees for analysis and transformation.
Koala 是一个用于管理 Web 资源预处理器编译、转译和后台监控的图形用户界面。它作为一个构建工具,将 Less、Sass 和 CoffeeScript 文件转换为浏览器兼容的 CSS 和 JavaScript。 该应用程序具有用于控制转换过程的可视化界面,无需命令行交互。它集成了一个后台文件监视器,当检测到本地文件系统发生更改时,会自动实时重新编译源文件。 该工具提供了用于管理全局和项目特定编译设置的实用程序,包括用于压缩编译代码的后处理压缩功能。它还包含一个捕获编译器输出以检测并报告语法错误的通知系统。
Transforming CoffeeScript into executable JavaScript while detecting syntax errors and managing output configurations.