RustPython / RustPython/Parser

Using strings inside f-string

オープン
#125 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

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

主要言語
Rust
スター
117
フォーク
38
平均マージ
4日 7時間
マージ済み PR(30日)
1

説明

From: https://github.com/mtshiba/pylyzer/issues/115

Starting with Python 3.12, the use of strings within f-strings is permitted.

Reference

However, the current parser implementation does not seem to allow the use of same quoting type strings within f-strings.

f"{"hello"}"

results in the following parsing error:

invalid syntax. Got unexpected token 'hello' at row 1 col 5

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

parser ファイルやテストは指定されていません。まず、示されている f-string の例を再現し、parser による置換フィールドとネストされた文字列の処理を追跡してください。完了条件は、同じ引用符を使用する例が Python 3.12 の構文規則に従って正常にパースされ、既存の f-string のパースにリグレッションが発生しないことです。

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

評価

技術スタック
python, rust
領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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