Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

parser: "expression nesting too deep" never reaches the first-error recorder (LSP/--lint show a cascade instead)

クローズ
#1,342 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c
領域
compilers, testing

調査の方向性

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 の本文から書いたものです。

説明

area:lint-tooling kind:silent-wrong

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_DEPTH guards record the error at the current token's line and column (and length).
  • --lint --json on the repro reports expression nesting too deep as 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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

InauguralSystems/EigenScript のほかの issue

InauguralSystems/EigenScript の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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