Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,343 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
C
Stelle
3
Fork
7
Merge medio
3h 56m
PR unite (30g)
102

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di InauguralSystems/EigenScript

Tutte le issue di InauguralSystems/EigenScript

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.