Mixed tab/space indentation: lexer and formatter measure width differently
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 4 h 5 min
- PR fusionados (30 d)
- 116
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de InauguralSystems/EigenScript
-
area:docs good first issue kind:docs-drift
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
InauguralSystems/EigenScript#1400 ·
Los mantenedores suelen responder en 1 día
-
area:docs good first issue kind:docs-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
InauguralSystems/EigenScript#1396 ·
Los mantenedores suelen responder en 1 día
-
docs/BUILTINS.md: task_spawn row says task_yield/task_join 'land in a later increment'; both existAbiertoarea:docs good first issue kind:docs-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1392 ·
Los mantenedores suelen responder en 1 día
-
area:embed kind:silent-wrong
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
InauguralSystems/EigenScript#1387 ·
Los mantenedores suelen responder en 1 día
-
area:stdlib kind:silent-wrong
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
InauguralSystems/EigenScript#1378 ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenScript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
python-pillow/Pillow#10087 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenPrinting/cups#1729 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
awslabs/amazon-kinesis-video-streams-webrtc-sdk-c#2406 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
DaveGamble/cJSON#1094 ·
-
status:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
PX4/PX4-Autopilot#28923 ·
Los mantenedores suelen responder en 1 día