RustPython / RustPython/Parser
Visitor trait `visit_arg` is never called
未关闭
还没有人认领这个 Issue。
- 主要语言
- Rust
- 星标
- 117
- 派生
- 38
- 平均合并
- 4 天 7 小时
- 30 天内合并 PR
- 1
描述
When using the Visitor trait I realized that the default values of arguments are never visited. This is because the visit_arg function is never actuall called:
https://github.com/RustPython/Parser/blob/4588ea5c3e6327009640e7c9c89eb6fa9220358e/ast/src/gen/visitor.rs#L737
I also could not see an implementation for visiting the default value of an arg.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中链接的 ast/src/gen/visitor.rs 第 737 行附近开始,检查 Visitor 如何处理函数参数及其默认值。跟踪现有的 visit_arg 路径,并确定应如何访问默认表达式。完成的标准是:使用 Visitor trait 时会访问参数默认值,并且有覆盖所报告行为的测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- compilers
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 50/100