microsoft / microsoft/TypeScript-TmLanguage

import declaration should not include semicolon or require line end

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

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

needs more info
主要言語
TypeScript
スター
471
フォーク
149
PR マージ指標
30日以内にマージされた PR はありません

説明

See https://github.com/Microsoft/vscode/issues/30527

The coffeescript grammar includes the JavaScript grammar.
With the following example:

`import Ember from 'ember'`
# foo bar baz
if true then console.log('qnx')

the JavaScript grammar is used to tokenize what's inside the backward quotes. Problem is that it does not return to the initial state after processing 'ember'. It expects a semicolon or the end of the line. Because of that, the JavaScript grammar scope remains and the rest of the file is colorized also with the JavaScipt grammar.

For supporting embedded cases like this, it would be great if the import declaration rule could end to end with the string literal or any non-expected symbol.

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

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

はじめの一歩

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

調査の方向性

まず、grammar ファイル内の import 宣言ルールを見つけ、issue に埋め込まれている CoffeeScript の例を再現します。JavaScript grammar が import の文字列リテラルをどのように処理し、周囲の grammar に戻るかを確認します。埋め込まれた import が文字列リテラルまたは別の予期しないシンボルで停止し、その後に続く CoffeeScript が JavaScript として色付けされなくなれば完了です。

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

評価

技術スタック
coffeescript, javascript, typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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