parser: "expression nesting too deep" never reaches the first-error recorder (LSP/--lint show a cascade instead)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 4時間 1分
- マージ済み PR(30日)
- 121
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:ci kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
InauguralSystems/EigenScript#1448 ·
メンテナーはふだん 1 日以内に返信
-
area:ci kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
InauguralSystems/EigenScript#1431 ·
メンテナーはふだん 1 日以内に返信
-
area:gates kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
InauguralSystems/EigenScript#1429 ·
メンテナーはふだん 1 日以内に返信
-
area:docs kind:docs-drift
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
InauguralSystems/EigenScript#1428 ·
メンテナーはふだん 1 日以内に返信
-
area:docs good first issue kind:docs-drift
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
InauguralSystems/EigenScript#1400 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
hfile_s3: reading to EOF fails with EINVAL when object size is a multiple of the read part sizeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Ryan-Millard/Img2Num#652 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
Status: Opened
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信