popcodeorg / popcodeorg/popcode

Handle multi-line statements in the console

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

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

enhancement
主要言語
JavaScript
スター
191
フォーク
143
平均マージ
4日 11時間
マージ済み PR(30日)
5

説明

If a student types the following into the console and presses Enter:

if (name === "Pop") {

The console should recognize that it is an incomplete statement, and allow the student to keep typing (with an expanded input area to accommodate the new line).

This seems hard—how do we distinguish between an incomplete multiline statement and a statement that is syntactically invalid for some other reason? Perhaps Esprima or one of our other linters/parsers throws a specific “unexpected end of input” type error that we can rely on.

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

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

はじめの一歩

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

調査の方向性

まず、コンソール入力の処理と、その parser または linter が例の文に対して入力の予期しない終了をどのように報告するかを追跡します。不完全な入力を他の構文エラーと区別する方法と、継続行に合わせて入力領域がどのように拡張されるかを確認します。例を複数行にわたって続けられる一方で、本当に無効な文については引き続きエラーが報告されれば完了です。

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

評価

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

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

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