swc/crates/swc_ecma_parser
yannkaiser 9e6dad9baf
fix(es/parser): Rescan << as < when parsing type args (#8607)
**Description:**

The related issue is a product to the fact that the lexer sees a `<<`
token in `fun<<T>...` and therefore parses the type args as an arrow
function.

This PR adds the handling of the "split" of `<<` when beginning to parse
type args.

I am open for suggestions, I still find this a bit odd (in
`parse_ts_type_args()`):
```rs
if is!(p, "<<") {
    p.input.cut_lshift();
} else {
    expect!(p, '<');
}
```

**Related issue:**

 - Closes #7187
 - Closes #8209
 - Closes #8581
2024-02-06 14:31:14 +00:00
..
benches refactor(swc_node_base): Rename to swc_malloc (#8272) 2023-11-11 19:10:56 +00:00
examples refactor(swc_node_base): Rename to swc_malloc (#8272) 2023-11-11 19:10:56 +00:00
scripts chore(xtask): Migrate scripts to xtask (#8072) 2023-10-06 14:44:53 +00:00
src fix(es/parser): Rescan << as < when parsing type args (#8607) 2024-02-06 14:31:14 +00:00
tests fix(es/parser): Rescan << as < when parsing type args (#8607) 2024-02-06 14:31:14 +00:00
.gitignore test(es): Update tsc test suite (#7323) 2023-04-24 14:59:19 +00:00
Cargo.toml chore: Bump crates 2024-02-06 02:47:51 +00:00
colors.js chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00