Feature Request: Add Multi-language Parser Support to ABCoder
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- c, cpp, go, java, javascript, python, rust, typescript
调研方向
从 docs/ 中的相关文档开始,并盘点现有的语言解析器以及 issue 中描述的 UniAST 设计。在实现之前确定具体的解析器接口和语言范围;当约定的语言通过可扩展架构完成集成,并且其代码可以由 UniAST 表示时,这项工作就完成了。
由索引模型根据 Issue 内容生成。
描述
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
abcoderas 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudwego/abcoder 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 42/100
-
难度 4/5 3-5 天 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 35/100
查看 cloudwego/abcoder 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
-
needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
googleapis/librarian#7670 · 2 条评论 ·