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

Lexer counts a leading tab as 4 columns in token spans; LSP rename then edits the wrong bytes

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

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

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

評価

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

調査の方向性

Start at the lexer’s token span and column tracking, then follow how the LSP rename operation consumes those spans. Run or extend the rename tests for a tab-indented identifier and an identifier after a leading tab inside an f-string. Done means both renames produce programs with identical output and token positions use source byte offsets.

索引モデルが issue の本文から書いたものです。

説明

area:lint-tooling found-by:code-review kind:silent-wrong

Found by /code-review on PR #1331. The problem predates that PR, which extends it to f-strings.

At line start, the lexer counts a tab as 4 columns for indentation, and it records token columns in those units rather than in bytes. So the token spans that the LSP uses for rename, cursor lookup and semantic tokens are off by 3 per leading tab:

  • on tab-indented lines (pre-existing);
  • after #1331, for an identifier right after a leading tab inside an f-string's braces: print of f"{<TAB>count}".

A rename then rewrites the wrong bytes.

Done when

  • Token columns and lengths are byte offsets in the source (indentation width is tracked separately from the column), or the LSP converts them correctly.
  • Rename tests: renaming an identifier on a tab-indented line, and after a leading tab inside f"{...}", produces a program with identical output.
主要言語
C
スター
3
フォーク
7
平均マージ
4時間 7分
マージ済み PR(30日)
112

環境構築

Codespaces で開く

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

はじめの一歩

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

InauguralSystems/EigenScript のほかの issue

InauguralSystems/EigenScript の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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