parser: "expression nesting too deep" never reaches the first-error recorder (LSP/--lint show a cascade instead)
Maintainer thường phản hồi trong vòng 1 ngày
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
- 78/100
Hướng nghiên cứu
Start in src/parser.c at the PARSE_MAX_DEPTH guards in parse_unary and parse_expression, then run the deep.eigs reproduction with --lint --json. Add regression coverage in tests/test_lsp.py or the --lint suite for the current-token location, message, length, and precedence when both limits trip; done means the reported error is expression nesting too deep and the existing #943 f-string checks still pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Repro
python3 -c "print('x is ' + '(' * 300 + '1' + ')' * 300)" > deep.eigs
src/eigenscript deep.eigs # stderr: Parse error line 1: expression nesting too deep (plus cascades)
src/eigenscript --lint --json deep.eigs
--lint --json and the LSP publish only the first recorded error. The PARSE_MAX_DEPTH guards in parse_unary and parse_expression (src/parser.c) call fprintf and g_parse_errors++, but never eigs_record_first_error*. As a result, the published diagnostic is whatever recovery cascade comes after it (for example expected ')', got '('), not the actual cause. I found this while working on #1331 (the 65-level f-string case from #943).
Done when
- Both
PARSE_MAX_DEPTHguards record the error at the current token's line and column (and length). -
--lint --jsonon the repro reportsexpression nesting too deepas its error, not a cascade. - A regression test in tests/test_lsp.py (or the --lint suite) fails with the fix reverted.
- The #943 f-string depth checks in tests/test_lsp.py still pass. Decide which message wins when both limits trip on one line, and write that decision in the test.
- Ngôn ngữ chính
- C
- Star
- 3
- Fork
- 7
- Merge trung bình
- 3 giờ 58 phút
- Pull request đã merge (30 ngày)
- 105
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của InauguralSystems/EigenScript
-
area:lint-tooling bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
InauguralSystems/EigenScript#1340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:stdlib found-by:code-review kind:silent-wrong
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
InauguralSystems/EigenScript#1338 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:lint-tooling found-by:critic kind:docs-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
InauguralSystems/EigenScript#1335 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ci found-by:critic kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
InauguralSystems/EigenScript#1311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetĐang mởarea:gates found-by:critic kind:decision
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
InauguralSystems/EigenScript#1280 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InauguralSystems/EigenScript
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
johnsonjh/emu2-cpm86#68 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Zenmap CrashĐang mởZenmap
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
BasedHardware/omi#19306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
fastfetch-cli/fastfetch#2619 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100