bug: ->* operator missed in `field_expression`

Đang mở
#377 1 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
70/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
compilers, tooling

Hướng nghiên cứu

Start with the C++ grammar definition for field_expression and its existing parser tests. Reproduce the failure in the Tree-Sitter playground with the provided snippet, then trace how choice expressions such as ->* are represented in the grammar. Add a regression case confirming that the snippet parses without errors.

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

Mô tả

bug
Did you check existing issues?
  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-cpp
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

0.27

Describe the bug

The ->* operator missed in choice clue in field_expression rule

Steps To Reproduce/Bad Parse Tree
  1. run standard playground
  2. select c++ language
  3. put to source struct s {struct k k; void foo(){}}; void b() {s * a1; auto f = &s::foo; a1->*f();}
  4. parse error occurred
Expected Behavior/Parse Tree

no parse error

Repro
// Example code that causes the issue
struct s {void foo(){}}; 
void b() {
  s * a1; 
  auto f = &s::foo; 
  a1->*f(); // <--error here at `*`
}
Ngôn ngữ chính
JavaScript
Star
463
Fork
196
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 tree-sitter/tree-sitter-cpp

Tất cả issue của tree-sitter/tree-sitter-cpp

Issue tương tự

Thêm issue về JavaScript

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.