Skip to content

Attach importer sourceURL/line/column to module link SyntaxErrors - #378

Open
robobun wants to merge 2 commits into
mainfrom
farm/0eec2e41/import-link-error-location
Open

Attach importer sourceURL/line/column to module link SyntaxErrors#378
robobun wants to merge 2 commits into
mainfrom
farm/0eec2e41/import-link-error-location

Attach importer sourceURL/line/column to module link SyntaxErrors

b5a21f5
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 1, 2026 in 25m 14s

Code review found 1 potential issue

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

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit Source/JavaScriptCore/runtime/CyclicModuleRecord.cpp:107-112 Line-count scan only recognizes '\n', diverges from JSC lexer's line-terminator set

Annotations

Check warning on line 112 in Source/JavaScriptCore/runtime/CyclicModuleRecord.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Line-count scan only recognizes '\n', diverges from JSC lexer's line-terminator set

nit: the line/column scan only counts `'\n'`, but the JSC lexer also treats `'\r'`, U+2028, and U+2029 as line terminators (see `Lexer<T>::isLineTerminator` / `shiftLineTerminator`). Sources using lone `\r` or Unicode line separators will report `line = firstLine` and a column equal to the absolute offset + 1. CRLF happens to work; matching the lexer's terminator set is a ~3-line change if you want the diagnostic to be exact.