google / google/google-java-format
Pass AST directly
未關閉
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 937
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
I am implementing a tool that generates Java source code. It uses GJF to make the output more readable.
At the moment, source code is generated as text and written to memory, then it is parsed and formatted by GJF.
I was wondering whether you would support an API where a `JCCompilationUnit` or `JCTree` could be passed to GJF directly? That way, my tool could just generate a tree. There would be less overhead since writing and parsing could be skipped altogether.
貢獻指南
研究方向
首先閱讀 GJF 的公開格式化 API,以及目前將原始碼文字剖析為編譯單元的路徑。確定如何讓 JCCompilationUnit 或 JCTree 直接進入該路徑,同時不改變現有的格式化行為。當所要求的樹狀結構 API 已定義並實作,且有測試展示格式化輸出時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100