RustPython / RustPython/Parser
Visitor trait `visit_arg` is never called
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 117
- Forks
- 38
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ast/src/gen/visitor.rs around line 737, as linked in the issue, and inspect how Visitor handles function arguments and their default values. Trace the existing visit_arg path and determine how default expressions should be visited. Done means argument defaults are visited when using the Visitor trait, with coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100