Improve YueScript support to continue expression on newline

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

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

評価

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

調査の方向性

issue ではソースファイルもテストも指定されていません。まず、複数行式用の YueScript parser のエントリーポイントを見つけ、次に operator が行末に来る場合の処理を、要求されている先頭 operator 形式の場合と比較します。完了条件は、末尾のバックスラッシュなしで例がパースおよびコンパイルできることです。

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

説明

Currently YueScript only supports continue expression on newline if the operator is at the end of the line. This is helpful but for me I prefer to put the operator at the beginning of the line.

I hove YueScript can support continue expression on newline if the operator is at the beginning of the line.
This is more consistent with the other languages, it's more readable and easier to comment out a expression clause for convenient.

exp = longExpMain
  or longExpA
  or longExpB
  or longExpC
  -- or longExpD
  --  easier to comment out when to experiment with code

Of course, I know I can put \ at the end of line but it just make code too ugly to look at and not readable.
Thanks and regards!

主要言語
Lua
スター
620
フォーク
45
平均マージ
9時間 5分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

IppClub/YueScript のほかの issue

IppClub/YueScript の issue をすべて見る

似ている issue

Lua の issue をもっと見る

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

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