Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

State Names should be able to start with UpperCase

Đang mở
#25 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu bằng cách xác định grammar và refinements AST parser, sau đó lần theo cách các tên state viết hoa hiện được phân loại là alias. Chạy các ví dụ được mô tả trong issue và thêm hoặc cập nhật các test bao quát cả state viết hoa và alias. Hoàn thành khi các tên state viết hoa hợp lệ được parse thành state mà không làm hỏng việc xử lý alias.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement good first issue

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

@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.

Ngôn ngữ chính
Java
Star
67
Fork
36
Merge trung bình
10 ngày 18 giờ
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của liquid-java/liquidjava

Tất cả issue của liquid-java/liquidjava

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.