dotnet / dotnet/csharp-tmLanguage
Syntax highlighting breaks when opening bracket of a method is placed in a new line
- 主要言語
- TypeScript
- スター
- 78
- フォーク
- 43
- 平均マージ
- 34分
- マージ済み PR(30日)
- 1
説明
_From @zeroskyx on May 17, 2017 18:46_
The following code placed in a class breaks syntax highlighting:
public void Routine
(
IInterface Interface0,
IInterface Interface1,
IInterface Interface2
)
{
string One = "";
string Two = "";
string Three = "";
}
interface IInterface
{
}
Beginning with the second instance of IInterface and after the method body, everything is white -- in more complex projects, somewhere it works again later in the file.
Screenshot:

Removing the newline after public void Routine does not cause the issue:

I am aware that this appears to be a "strange" coding style; it makes reading constructors with loads of dependency injections much cleaner though (issue happens with both methods and constructors).
_Copied from original issue: OmniSharp/omnisharp-vscode#1489_
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、C# サンプルで報告されたハイライトの失敗を再現し、開き括弧が宣言行に残っているバージョンと比較します。次に、構文文法がその改行をまたぐメソッドおよびコンストラクターの宣言をどのように処理しているかを調べます。残りのパラメーター、メソッド本体、および後続のインターフェイスが正しくハイライトされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100