awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

17 个仓库

Awesome GitHub RepositoriesStructural Pattern Matching

Identifying code fragments using a combination of literals, regular expressions, and flexible AST bindings.

Distinct from Text Pattern Matching: Distinct from simple text search or binary matching; it operates on the structure of source code.

Explore 17 awesome GitHub repositories matching programming languages & runtimes · Structural Pattern Matching. Refine with filters or upvote what's useful.

Awesome Structural Pattern Matching GitHub Repositories

用 AI 发现最棒的仓库。我们将通过 AI 为您搜索最匹配的仓库。
  • xi-editor/xi-editorxi-editor 的头像

    xi-editor/xi-editor

    19,816在 GitHub 上查看↗

    xi-editor is a high-performance text editor core written in Rust. It employs a client-server architecture that separates the backend editor logic from the user interface, allowing diverse frontends to communicate with the core via a standardized protocol. The project is distinguished by its use of rope-based text buffers for efficient manipulation of large documents and a collaborative engine powered by conflict-free replicated data types to synchronize concurrent edits. It further features an extensible plugin system that integrates external binaries and third-party tools through JSON-based

    Employs non-commutative monoids to track nesting balance for fast identification of matching parentheses and brackets.

    Rust
    在 GitHub 上查看↗19,816
  • reasonml/reasonreasonml 的头像

    reasonml/reason

    10,313在 GitHub 上查看↗

    Reason is a strongly typed functional language and multi-target compiler designed to produce either JavaScript for web environments or native machine code for operating systems. It serves as an OCaml-compatible language that shares an abstract syntax tree with OCaml, providing a practical syntax for the OCaml ecosystem. The project functions as a type-safe frontend language, incorporating JSX support to build user interfaces through structural elements that translate into type-safe function calls. It enables deep integration with the JavaScript ecosystem, allowing the use of existing librarie

    Ships powerful structural pattern matching to execute conditional logic based on data shapes.

    OCamljavascriptocamlprogramming-language
    在 GitHub 上查看↗10,313
  • mattn/emmet-vimmattn 的头像

    mattn/emmet-vim

    6,463在 GitHub 上查看↗

    emmet-vim is a plugin for Vim that functions as a markup automation tool and code expander. It allows for the rapid generation of HTML and CSS structures by expanding shorthand text expressions into full code elements. The tool provides a set of shortcuts for wrapping, balancing, and manipulating tags. It includes a text object extension that enables navigation and editing commands for jumping between nested element boundaries. The project covers a range of capabilities for frontend code refactoring and document hierarchy restructuring. These include tag wrapping, element removal, attribute

    Enables moving the cursor across element boundaries to navigate and edit nested structures quickly.

    Vim Script
    在 GitHub 上查看↗6,463
  • python-attrs/attrspython-attrs 的头像

    python-attrs/attrs

    5,799在 GitHub 上查看↗

    attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it

    Generates match arguments to enable structural pattern matching on instances in Python 3.10+.

    Python
    在 GitHub 上查看↗5,799
  • tc39/proposal-pattern-matchingtc39 的头像

    tc39/proposal-pattern-matching

    5,782在 GitHub 上查看↗

    This is a TC39 proposal to add declarative pattern matching syntax to the ECMAScript language. It introduces a match expression that allows developers to inspect and branch on data structures using patterns with destructuring, guards, and logical combinators. The proposal defines a custom matcher protocol via a well-known symbol, enabling objects to implement user-defined matching logic with arbitrary extraction and decomposition. The proposal supports matching against literal primitives using SameValue equality with special handling for signed zero and NaN, as well as relational comparison

    Extends language grammar with a match expression that destructures values against nested patterns declaratively.

    HTML
    在 GitHub 上查看↗5,782
  • scala-js/scala-jsscala-js 的头像

    scala-js/scala-js

    4,701在 GitHub 上查看↗

    Scala.js 是一个编译器和跨平台语言工具链,将 Scala 源代码转换为 JavaScript 或 WebAssembly。它作为 JavaScript 生态系统的一种静态类型工具,支持为 Web 浏览器和 Node.js 环境开发应用程序。 该项目作为一个 JavaScript 互操作框架,允许创建类型安全的门面(facades)和绑定,以与外部库和全局对象进行交互。它提供了静态和动态 JavaScript 调用机制,包括生成 TypeScript 绑定以及导出内部逻辑以供外部 JavaScript 代码使用的能力。 该工具链包含一个用于生产环境打包和输出优化的前端构建工具,包括死代码消除和模块拆分。它涵盖了广泛的功能面,包括用于 UI 开发的 DOM 元素类型检查、用于全栈开发的跨平台代码共享,以及用于验证优化构建产物的各种测试框架。 编译后的脚本可以使用 JavaScript 解释器直接在命令行环境中执行。

    Extracts values from nested data structures using pattern matching to replace traditional conditional logic.

    Scala
    在 GitHub 上查看↗4,701
  • martanne/vismartanne 的头像

    martanne/vis

    4,634在 GitHub 上查看↗

    Vis 是一个基于终端的模态文本编辑器,利用 vi 键绑定和结构化正则表达式系统。它作为一个可脚本化的环境,使用 Lua 进行配置、自定义键映射和插件开发。 该编辑器的特色在于基于解析表达式语法 (PEG) 的语法高亮系统,以及将文本视为复杂搜索和替换操作结构的模式匹配引擎。它还直接与系统 Shell 集成,允许用户将文本范围通过管道传输到外部命令并捕获输出结果。 该项目提供了广泛的文本操作功能,包括使用多个光标和选区、用于非线性撤销和重做历史的定向图,以及通过 VT-100 转义序列渲染的多窗口界面。用户可以通过嵌入式脚本 API 定义自定义动作和运算符。 该应用可编译为单个静态链接的二进制文件,以实现可移植性。

    Identifies text ranges using extended regular expressions to target specific patterns for commands.

    C
    在 GitHub 上查看↗4,634
  • immunant/c2rustimmunant 的头像

    immunant/c2rust

    4,642在 GitHub 上查看↗

    c2rust is a source-to-source translation suite and C-to-Rust transpiler designed to convert C source code and libraries into functionally equivalent unsafe Rust code. It operates as a pipeline that preserves original behavior and data structures, producing translated code that compiles as compatible shared libraries or Rust crates. The system includes an automated Rust refactoring framework that uses pattern-based AST rewriting to transform unsafe Rust into safe, idiomatic constructs. It utilizes an ownership inference engine to determine when raw pointers can be converted into safe reference

    Parses pattern strings into syntax fragments and matches them against source code to extract transformation bindings.

    Rustmemory-safetymigrationrust
    在 GitHub 上查看↗4,642
  • andrewplummer/sugarandrewplummer 的头像

    andrewplummer/Sugar

    4,506在 GitHub 上查看↗

    Sugar 是一个 JavaScript 实用程序库,旨在通过额外的方法扩展原生对象和原型,以进行数据操作和转换。它作为一个工具包,用于对象实用程序、日期操作、字符串变形以及缺失或损坏的标准语言功能的 Polyfill。 该库提供了将实用方法直接映射到内置原型或将值包装在临时对象中以实现方法链的能力,而无需修改全局原型。它还包括一个 Polyfill 系统,通过实现缺失的现代语言功能来确保跨不同执行环境的一致行为。 功能包括国际日期格式化和人类可读日期字符串的解析。该库还通过字符串变形和规范化、嵌套对象的深度属性遍历以及区域感知数组排序来处理自然语言处理。此外,它还提供了用于克隆可变对象以及定义数字、日期和字符串值范围的工具。

    Simplifies array element matching using strings, regular expressions, or partial object shortcuts.

    JavaScript
    在 GitHub 上查看↗4,506
  • biomejs/gritqlbiomejs 的头像

    biomejs/gritql

    4,530在 GitHub 上查看↗

    GritQL is an AST-based code transformation engine and structural search tool. It uses a declarative query language to identify and rewrite source code patterns across multiple programming languages by matching abstract syntax tree nodes rather than literal text. The system functions as an automated refactoring framework for large-scale migrations and API updates. It distinguishes itself by utilizing sequential transformation pipelines and reusable blueprints that can be synced between local environments and remote repositories. The tool covers a broad range of capabilities including static a

    Restricts a pattern's matches to nodes that satisfy additional structural conditions like parent or sibling relationships.

    Rustastcodemodjavascript
    在 GitHub 上查看↗4,530
  • facebookarchive/codemodfacebookarchive 的头像

    facebookarchive/codemod

    4,133在 GitHub 上查看↗

    Codemod 是一套用于执行结构化源代码转换的软件工具。它作为一个自动化代码库迁移工具,利用抽象语法树操作而非简单的正则表达式,在多个文件之间执行大规模重构。 该项目通过一个提供彩色差异的交互式转换界面脱颖而出,允许用户手动审查、接受或修改每个匹配项。它还支持分布式重构工作流,能够将代码库分割成指定的任务块,以便在多个贡献者之间分配迁移任务。 该工具集涵盖了脚本化转换逻辑、模式匹配搜索引擎以及基于扩展的文件过滤功能,以将操作限制在项目的特定子集中。

    Identifies specific code fragments using structural pattern matching based on AST bindings and regular expressions.

    Python
    在 GitHub 上查看↗4,133
  • memgraph/memgraphmemgraph 的头像

    memgraph/memgraph

    4,163在 GitHub 上查看↗

    Memgraph is an in-memory, distributed graph database designed for high-performance labeled property graph management. It utilizes a Cypher query engine for declarative data retrieval and manipulation, providing a scalable knowledge graph backend that integrates vector search and graph traversals. The system distinguishes itself as a real-time graph analytics platform, employing native C++ and CUDA implementations to execute complex network analysis and dynamic community detection on streaming data. It provides specialized support for AI integration, including GraphRAG capabilities, the constr

    Retrieves nodes and relationships that match structural patterns, labels, or paths.

    C++cyphergraphgraph-algorithms
    在 GitHub 上查看↗4,163
  • fluentassertions/fluentassertionsfluentassertions 的头像

    fluentassertions/fluentassertions

    3,815在 GitHub 上查看↗

    FluentAssertions is a library of extension methods for .NET that provides a human-readable syntax for verifying expectations in unit tests. It serves as a validation layer that integrates with MSTest, NUnit, and xUnit to throw framework-specific exceptions upon assertion failure. The project includes a structural equivalency engine that performs deep member-by-member validation of .NET objects using configurable matching rules. It is designed for test-driven and behavior-driven development by generating descriptive failure messages that explain the difference between actual and expected resul

    Provides a deep member-by-member validation engine for .NET objects with configurable matching rules.

    C#assertionsbdd-stylec-sharp
    在 GitHub 上查看↗3,815
  • openrewrite/rewriteopenrewrite 的头像

    openrewrite/rewrite

    3,312在 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

    Identifies specific code structures using textual templates and AST bindings to extract parameters for transformations.

    Javaabstract-syntax-treeastcode-search
    在 GitHub 上查看↗3,312
  • databricks/scala-style-guidedatabricks 的头像

    databricks/scala-style-guide

    2,784在 GitHub 上查看↗

    Places match on the same line as the method declaration and avoids expanding all arguments for type-only matches.

    在 GitHub 上查看↗2,784
  • comby-tools/combycomby-tools 的头像

    comby-tools/comby

    2,657在 GitHub 上查看↗

    Comby 是一个命令行实用程序,专为跨多种编程语言的结构化代码搜索和转换而设计。它作为一个代码转换引擎,通过利用语法感知模板来识别和修改源代码模式,确保操作尊重语言边界,如嵌套块、字符串和注释。 该工具的特色在于将各种编程语言映射为统一的结构化表示,从而允许在忽略无关空格和格式的情况下进行一致的模式匹配。它通过执行状态机来执行搜索和替换任务,该状态机验证结构完整性,从而在保留源代码原始缩进和风格约定的同时实现精确修改。 除了简单的搜索和替换外,该工具还通过应用项目范围的语法更新来支持大规模代码库迁移和自动化重构。用户可以通过交互式终端界面验证这些修改,该界面允许在提交到文件系统之前检查和选择性地协调更改。

    Matches code patterns by parsing syntax boundaries into abstract templates that ignore irrelevant whitespace.

    OCamlcgojava
    在 GitHub 上查看↗2,657
  • z-pattern-matching/zz-pattern-matching 的头像

    z-pattern-matching/z

    1,715在 GitHub 上查看↗

    Z is a pattern matching library for JavaScript that evaluates variables against structural shapes, data types, and literal values to branch program execution conditionally. It functions as a functional programming utility designed to deconstruct arrays and objects into parts during conditional evaluation. The library transforms human-friendly pattern matching syntax into optimized nested conditional statements during compilation or initialization phases, evaluating complex structural conditions and returning matching branch results directly as standard expression values. It inspects runtime d

    Evaluates target objects against structural templates to extract inner values and execute corresponding handler functions conditionally.

    JavaScriptfunctional-programmingimmutabilitypattern-matching
    在 GitHub 上查看↗1,715
  1. Home
  2. Programming Languages & Runtimes
  3. Structural Pattern Matching

探索子标签

  • Array Structure Matching1 个子标签Testing that a subject is iterable with a specific number of items, matching each item against a sub-pattern. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: focuses specifically on array/iterable length and element matching, not general structural matching.
  • Contextual Match FiltersRestricts a pattern's matches to nodes that satisfy additional structural conditions like parent or sibling relationships. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: adds contextual filtering based on AST relationships, not just pattern matching.
  • Contextual Match RestrictionsRestricts a pattern to only match when it appears inside a specific enclosing code structure, such as a try/catch block. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: focuses on restricting matches by surrounding context, not general structural matching.
  • ECMAScript Match ExpressionsAdds a match expression to JavaScript for declarative inspection and branching on data structures with destructuring and guards. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: focuses on the ECMAScript-specific match expression syntax, not general structural pattern matching.
  • Formatting ConventionsRules for placing match expressions on the same line as method declarations and avoiding full argument expansion for type-only matches. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: focuses on code formatting and placement of match expressions, not the matching logic itself.
  • Iterable Structure MatchingTests that a subject is iterable with a specific number of items, matching each against sub-patterns and optionally collecting remaining items with a rest pattern. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: focuses on iterable length and rest collection rather than AST code fragment matching.
  • Nesting Balance AnalysisUse of algebraic structures to identify matching pairs of brackets and parentheses based on nesting depth. **Distinct from Structural Pattern Matching:** Focuses on the algorithmic tracking of nesting balance for navigation, distinct from general AST structural matching.
  • Object Structure MatchingTests that a subject has specified properties, optionally matching each property value against a sub-pattern and collecting unmatched enumerable own properties with a rest pattern. **Distinct from Structural Pattern Matching:** Distinct from Structural Pattern Matching: focuses on object property presence and value matching rather than AST code fragment matching.
  • Structural Equivalency EnginesComparison systems that perform deep, member-by-member validation of objects based on configurable rules. **Distinct from Object Structure Matching:** Distinct from pattern matching as it is specifically for validating equivalence of object graphs during testing.