Files
leaysgur b2793fa2d8 fix(parser): reject module syntax in script (#27220)
Fixes #25187, closes #25204.

Previously, this check was performed by semantic phase, but since it can be detected in advance, it has been moved to the parser as per our previous policy.

[Babel](https://ast-explorer.dev/#eNotjDEOwjAMRa8See4JunIFNsLgRgaC0thKXASKcnfcNtt/78lukGCGN36whhJFYQIxseBCyXawTV/hoq51YzZuPjvnofJWAl1/Qh7mnY97D9OZJW3PmOvebvfhEgfUyKd9YKo0AqpieF14XSnbixF97tD/NgY0iA==) also reports this in the parser.

Conformance test harness also updated:

- codegen: `if() { import }` is now invalid input
  - => use `declare module {}` for indent instead
- transformer: Revert #26495 change
  - => defaults to `unambiguous` (Correct me if I'm wrong 🙏🏻)
2026-09-30 07:49:35 +00:00
..