Question: How to walk/visit the AST?
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
調査の方向性
rustpython_parser::parse エントリポイントと body 内の AST 文から始めます。RustPython パッケージに既存の AST visitor または traversal API があるか確認し、それで関数定義やクラス定義内にネストされた import に到達できるか確認してください。
索引モデルが issue の本文から書いたものです。
説明
I'm trying to extract all the imports from a python file. To do this I'm using the rustpython_parser::parse function to get an AST and then iterating over all the statements in the body to find Stmt::Import and Stmt::ImportFrom. This works for imports defined at the root of the file, however misses any imports defined inside e.g. function/class definitions etc. So I think what I really want to do is walk the AST and visit all the nodes. Is there some way to achieve this with one of the rustpython packages?
- 主要言語
- Rust
- スター
- 117
- フォーク
- 38
- 平均マージ
- 4日 7時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustPython/Parser のほかの issue
-
Maintenance status オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
RustPython/Parser#140 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
RustPython/Parser#139 · コメント 3 件 ·
-
cargo audit paste オープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
RustPython/Parser#137 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
RustPython/Parser#133 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
RustPython/Parser#130 ·
RustPython/Parser の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MystenLabs/sui#28056 · コメント 1 件 ·
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Luminous-Dynamics/mycelix#2577 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
registrystack/registry-stack#1239 ·
-
package-request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
msys2/MINGW-packages#31806 ·