editors: escaped f-string braces are highlighted as interpolation
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
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- vim, vscode
- Ambito
- tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- 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 68/100
trezor/trezor-firmware#7997 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
area/ysql kind/bug priority/medium status/awaiting-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
yugabyte/yugabyte-db#34415 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
KhronosGroup/OpenCL-Headers#318 ·
-
Build failure: mumbleAperta0.kind: build failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno