editors: escaped f-string braces are highlighted as interpolation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- vim, vscode
- Área
- tooling
Línea de trabajo
Start with editors/vscode/syntaxes/eigenscript.tmLanguage.json and editors/vim/syntax/eigenscript.vim, using the lexer f-string escape handling in src/lexer.c as the behavior contract. Reproduce the supplied f-string fixture and inspect scopes before and after in both grammars, with VS Code semantic tokens disabled. Done means escaped braces remain literal, genuine interpolation is scoped as an expression, and existing string escapes continue to work.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The bundled editor grammars treat an escaped opening brace in an f-string as the start of interpolation. EigenScript's lexer treats \{ and \} as literal braces.
Reproduce
print of f"literal \{name\}"
The runtime prints literal {name} without looking up a variable called name. In the VS Code grammar, the f-string escape pattern does not consume the backslash-plus-brace, so the interpolation pattern matches the following {. The Vim escape declaration omits braces too.
Checked at b91768e23c5a874a64e76e4af9ab291e6aa49983:
The runtime output and exact VS Code regex behavior were checked; this report does not claim a GUI/TextMate-engine verification.
First-contribution scope
Correct the two editor grammars so escaped braces retain their string/escape scope and do not start interpolation when they occur in the f-string's literal text. Use the existing lexer behavior as the contract; handling of braces inside an expression is outside this issue. No runtime change is required.
Done when
- Escaped opening and closing braces remain literal f-string content.
- Genuine interpolation still receives an expression scope.
- Mixed literal and interpolated segments work, including an escaped backslash immediately before a genuine interpolation.
- Plain strings and existing quote/backslash escapes keep their behavior.
- Provide a small fixture and before/after scope inspection for both grammars, including VS Code with semantic tokens disabled.
This is suitable for a contributor familiar with regular expressions and editor configuration. It shares files with #1233 and #1234; keep the fix focused and coordinate/rebase if one lands first.
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 3 h 58 min
- PR fusionados (30 d)
- 105
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
NabuCasa/silabs-firmware-builder#231 · 1 comentario ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/pg_clickhouse#383 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día