microsoft / microsoft/TypeScript

Report candidates on closing list terminators

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

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

Domain: Error Messages Effort: Difficult Experience Enhancement
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

From @robpalme: https://twitter.com/robpalmer2/status/1190383568612184064

function base_init() {
{
    
}

    function me() {
    
}

https://www.typescriptlang.org/play/?ssl=8&ssc=1&pln=9&pc=1#code/GYVwdgxgLglg9mABAIwIYGcCmB9GYZQAUAlIgN4BQliNiFAvhRbYqJLAogLaYnnO0GFIA

Motivation

When an ending curly brace (or similar) is missing, we can give some better hints to the user.

In some cases, this might be because a stray } throws parsing off.

Suggestion

It would be very cool to explain a possible reason that the user is getting a '}' expected error:

}
~
This '}' occurs at the same indentation level, but corresponds to a different brace.

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

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

はじめの一歩

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

調査の方向性

まず、リンクされた TypeScript Playground で例を再現し、結果として得られる '}' expected 診断を調べます。リストの終了ターミネータがどのように識別されるか、またインデントレベルの不一致をどのように報告できるかを判断します。完了の条件は、例が提案されたヒントを生成し、他の波かっこの解析診断を悪化させないことです。

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

評価

技術スタック
typescript
領域
compilers
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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