Skip to content

repl: recognize regex literals and comments in continuation detection - #37327

Closed
robobun wants to merge 32 commits into
mainfrom
farm/10b8d6c1/repl-regex-literals
Closed

robobun wants to merge 32 commits into
mainfrom
farm/10b8d6c1/repl-regex-literals

repl: use a banner-proof needle in the nested generic test

f1dacfe
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 11, 2026 in 32m 26s

Code review found 2 potential issues

Found 1 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/cli/repl.rs:2588-2590 after_keyword fires on 'void' in TS type position after as/satisfies

Annotations

Check warning on line 2590 in src/runtime/cli/repl.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

after_keyword fires on 'void' in TS type position after as/satisfies

`after_keyword` (repl.rs:2588-2590) has no gate for TS type position, so `(x as void / 2)` sees word=`void` ∈ REGEX_KEYWORDS, `word_after_dot=false` → `after_keyword=true` → `starts_regex` swallows ` 2)` → `...` prompt for complete valid TSX (regression vs pre-PR); same for `(x satisfies void / 2)`. `void` is the only REGEX_KEYWORDS entry that is also a bare TS type keyword. Not a duplicate of the open `Map<K,V>` `jsx_end` comment or the `b'{'` arm's `as`/`satisfies` fix in bfdcb011 — this is `a