liquid-java / liquid-java/liquidjava

State Names should be able to start with UpperCase

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

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

enhancement good first issue
主要言語
Java
スター
67
フォーク
36
平均マージ
10日 18時間
マージ済み PR(30日)
3

説明

## Why
There is some confusion about what can be written in uppercase and lowercase, and we only defined that in the Grammar.

During the user study, some participants started writing the state names capitalized (i.e., first letter Upper Case and the remaining in lower case). However, the current grammar does not allow it since capitalization is reserved for Alias.

Maybe it would make sense to allow both types to be capitalized specially since we got different annotation for each that serve as syntax sugar but help desambiguate.

## Example
```java
@StateSet({"Uninitialized", "Initialized"})
public class SM1 {

@StateRefinement(to="Uninitialized(this)")
public SM1() {}

@StateRefinement(from="Uninitialized(this)", to="Initialized(this)")
public void initialize() {}
}
...
public static void main(String[] args) {
SM1 sm1 = new SM1();
sm1.initialize(); //Error
}
```
The states are capitalized so they are handled as alias which should not be the correct behavior.

## Steps
1. Allow in the grammar that states can be capital (confirm if it is needed).
2. When parsing the refinements AST make sure the capitalized states are treated as such and not as alias.
3. Test with examples.

## Current Approach
Check if any of the state names provided starts with uppercase - if so, immediately return with an error.

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

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

はじめの一歩

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

調査の方向性

まず grammar と refinements AST parser の場所を特定し、次に先頭が大文字の状態名が現在どのように alias として分類されているかを追跡します。issue に記載された例を実行し、先頭が大文字の状態と alias の両方を対象とするテストを追加または更新します。先頭が大文字の有効な状態名が状態としてパースされ、alias の処理を壊さなければ完了です。

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

評価

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

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

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