This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Description
Environment information
Cannot run rome rage, issue found by fuzzer.
**Additional Context**:
Discovered by: Implement round-trip fuzzers for finding correctness bugs [#4559](https://github.com/rome/tools/pull/4559)
What happened?
The following cases crash with the thread '<unnamed>' panicked at 'assertion failed: modifiers.is_empty()', /rome/tools/crates/rome_js_parser/src/syntax/class.rs:567:13:
class @
class C@
I suspect there are actually two bugs here:
- That the class name is not flagged as invalid if there is an invalid class name containing the @ sign
- If encounters an @ sign as the first character when calling a class member - crashes. Calling a decorator on nothing within a class results in an unhandled crash, i.e. not categorized as an invalid decorated class member.
Affected formatters:
rome_format_d_ts
rome_format_jsx
rome_format_module
rome_format_script
rome_format_tsx
rome_format_typescript
Expected result
Formatters should not crash.
Code of Conduct