Multi-line f-string interpolations: spliced sub-lex enforces indentation, and lines after them are reported one early
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
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- compilers, testing-qa
Línea de trabajo
Trace the C lexer paths for multi-line f-string interpolation, focusing on the spliced sub-lex indentation checks and newline accounting. Reproduce the two examples, then add regression coverage for the printed result and later diagnostic line; verify that lib/eigen.eigs agrees in the meta-parity test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found by /code-review on PR #1324, and pre-existing on main 940af49.
A multi-line f-string interpolation is re-lexed as if it were its own file. The lexer starts that text at column 0 and checks its indentation, so a continuation line that isn't aligned is a hard error, even though the layout tokens are thrown away:
print of f"{ 1 +
2}"
fails with "indentation does not match any outer level" (exit 1). #1324 makes this easier to reach, because a # comment can now end the first line.
Also, newlines inside an f-string do not advance the line counter, so every later diagnostic is reported one line early. A multi-line f-string followed by x is 1 / 0 on line 4 reports "line 3".
Done when
- The spliced sub-lex of an interpolation does not apply indentation rules; the program above prints
3. - Newlines inside an f-string advance the line counter; an error after a multi-line f-string reports its true line (regression test).
-
lib/eigen.eigsagrees (meta-parity test).
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 3 h 56 min
- PR fusionados (30 d)
- 102
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:lint-tooling bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1340 ·
Los mantenedores suelen responder en 1 día
-
area:stdlib found-by:code-review kind:silent-wrong
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1338 ·
Los mantenedores suelen responder en 1 día
-
area:lint-tooling found-by:critic kind:docs-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InauguralSystems/EigenScript#1335 ·
Los mantenedores suelen responder en 1 día
-
area:ci found-by:critic kind:gate-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
InauguralSystems/EigenScript#1311 ·
Los mantenedores suelen responder en 1 día
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetAbiertoarea:gates found-by:critic kind:decision
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
InauguralSystems/EigenScript#1280 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenScript
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
johnsonjh/emu2-cpm86#68 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Zenmap CrashAbiertoZenmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
fastfetch-cli/fastfetch#2619 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Template: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
betaflight/betaflight#15759 ·
Los mantenedores suelen responder en 1 día