Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature Request: Add Multi-language Parser Support to ABCoder

未关闭
#64 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞

调研方向

从 docs/ 中的相关文档开始,并盘点现有的语言解析器以及 issue 中描述的 UniAST 设计。在实现之前确定具体的解析器接口和语言范围;当约定的语言通过可扩展架构完成集成,并且其代码可以由 UniAST 表示时,这项工作就完成了。

由索引模型根据 Issue 内容生成。

描述

C-feature-request E-help-wanted

1. Summary

This proposal outlines the plan to extend abcoder to support multiple programming languages. Currently, abcoder's capabilities are limited to Go/Rust/C/Pyhon, which restricts its use in polyglot environments. By adding multi-language support, we can significantly broaden the tool's applicability and enhance its utility for a wider range of projects.

2. Motivation

The primary motivation for this feature is to make abcoder a more versatile and powerful tool for code analysis and transformation. Many modern software projects are built using multiple languages, and a tool that can seamlessly handle this diversity is essential. Supporting multiple languages will enable developers to:

  • Analyze and understand complex, multi-language codebases.
  • Perform consistent code quality checks and enforce standards across different languages.
  • Automate refactoring and code generation tasks in polyglot projects.
  • Facilitate cross-language interoperability and integration.

3. Detailed Design

To achieve multi-language support, we will implement a flexible and extensible parser architecture. The key components of this design are:

  • Pluggable Parser Interface: We will define a standardized interface for language parsers. This will allow new parsers to be integrated into abcoder as plugins, without requiring changes to the core system. Each parser will be responsible for transforming source code into a Universal Abstract Syntax Tree (UniAST).

  • Universal Abstract Syntax Tree (UniAST): The UniAST will serve as a common, language-agnostic representation of the code's structure. We will need to ensure that the UniAST is expressive enough to capture the semantics of all supported languages. This may involve extending the existing UniAST definition to accommodate new language constructs.

  • Language-Specific Parsers: We will develop individual parsers for each supported language. These parsers will implement the pluggable parser interface and handle the specifics of parsing their respective languages. The initial set of languages to be supported will be determined based on community demand and strategic importance.

4. In-Progress Languages

Language Status Assignee
Go Done @AsterDY
Rust Done @AsterDY
C Done @Hoblovski
Python In Progress @Hoblovski
Java Done @Huabuxiu
TypeScript/JavaScript Done @angrychow
C++ Not Started

5. Reference

Some related docs can be found here: https://github.com/cloudwego/abcoder/tree/main/docs

We welcome feedback and suggestions from the community on these and any other aspects of this proposal.

主要语言
Go
星标
391
派生
58
平均合并
2 天 21 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudwego/abcoder 的其他 Issue

查看 cloudwego/abcoder 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。