[FEATURE] Add --show-python flag: print transpiled Python without executing

オープン 初心者向け
#36 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
cli

調査の方向性

main() から始めて、CLI が .dmai ファイルをどのように読み込み、translate_imports と transpile_maithili_code をどう呼び出しているかを確認し、その後 EXIT_OK とファイル未検出時の終了コードがどこで設定されているかを探してください。実行する代わりに、トランスパイル済みのソースを stdout に出力するフラグを追加し、issue が提案しているとおりリンティングを先に実行するかどうかを決めてください。tests/test_cli.py の新しいテストが通れば完了です。既知の例に対して出力に def または print が含まれ、終了コードが 0 であり、ファイルが存在しない場合も引き続き 3 で終了することを確認します。

索引モデルが issue の本文から書いたものです。

説明

area:cli enhancement good first issue P3

Add a --show-python (or --transpile) flag that prints the transpiled Python source for a .dmai file instead of executing it.

Why: invaluable for learners ("what does my Maithili code become?"), for debugging transpiler issues (most bug reports in this tracker were found this way), and for using the transpiler output in other tooling.

Sketch: in main(): read file → translate_imports → transpile_maithili_code → print result to stdout, exit EXIT_OK. Decide and document whether linting runs first (suggest: skip lint, this is a debugging view).

Tests: tests/test_cli.py — output contains def/print for a known example; exit code 0; file-not-found still exit 3.

Good first issue: the pipeline already exists — this exposes it.

主要言語
Python
スター
1
フォーク
4
平均マージ
12日 21時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

alphacrack/python-maithili-dsl のほかの issue

alphacrack/python-maithili-dsl の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。