Mixed tab/space indentation: lexer and formatter measure width differently
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with src/fmt.c and its measure_indent function, then locate the lexer's leading-whitespace measurement. Decide whether both should share one indentation-width rule or mixed tabs and spaces should be rejected. Add tests using the same mixed-indent files for parsing and formatting, and verify the file produces identical output before and after --fmt.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found by the builder on #1368.
The lexer measures leading whitespace without tab stops. \t measures 6 (2 + 4). In \t \t, the second tab is not counted, giving width 5, so \t \t followed by \t raises "unexpected indent". src/fmt.c measure_indent uses tab stops of 4. So the lexer and the formatter can disagree about the block structure of a mixed-indent file, and --fmt could re-indent a file into a different program.
Done when
- The lexer and fmt share ONE indentation-width function (or the language refuses mixed tab/space indentation outright, with a stated rule).
- A test feeds the same mixed-indent files to both and asserts the same block structure; running the file before and after
--fmtprints the same output.
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 4h 5m
- PR unite (30g)
- 116
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
area:docs good first issue kind:docs-drift
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
InauguralSystems/EigenScript#1400 ·
I maintainer di solito rispondono entro 1 giorno
-
area:docs good first issue kind:docs-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
InauguralSystems/EigenScript#1396 ·
I maintainer di solito rispondono entro 1 giorno
-
docs/BUILTINS.md: task_spawn row says task_yield/task_join 'land in a later increment'; both existApertaarea:docs good first issue kind:docs-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
InauguralSystems/EigenScript#1392 ·
I maintainer di solito rispondono entro 1 giorno
-
area:embed kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
InauguralSystems/EigenScript#1387 ·
I maintainer di solito rispondono entro 1 giorno
-
area:stdlib kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
InauguralSystems/EigenScript#1378 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
DaveGamble/cJSON#1094 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Status: Opened
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Issue-Bug Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno