Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Multi-line f-string interpolations: spliced sub-lex enforces indentation, and lines after them are reported one early

Open
#1,337 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

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.

Written by the indexing model from the issue text.

Description

area:runtime-vm found-by:code-review kind:silent-wrong

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.eigs agrees (meta-parity test).
Dominant language
C
Stars
3
Forks
7
Avg merge
3h 56m
Merged PRs (30d)
102

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InauguralSystems/EigenScript

All issues in InauguralSystems/EigenScript

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.