apache / apache/datafusion-sqlparser-rs

Comment handling

未关闭
#175 5 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
3.5k
派生
772
平均合并
4 天 9 小时
30 天内合并 PR
17

描述

I've been working on [a SQL formatter](https://github.com/maxcountryman/forma) that leverages this library extensively. One problem with using `sqlparser-rs` right now is that comments are treated like whitespace and removed from the AST. I'm curious if there would be any interest in bringing comments into the AST? Perhaps this could be optional, since I imagine it's not terribly useful for most cases.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查 sqlparser-rs 的 lexer、parser 和 AST 处理,以确定当前如何丢弃注释,以及如何适配可选的注释保留。完成标准是确定在 AST 中以 opt-in 方式表示注释的设计,并且其行为适用于链接的 SQL formatter;该 issue 未指明文件或测试。

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

评估

技术栈
rust, sql
领域
compilers
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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