The following is valid TypeScript code:
swc cannot parse this as
swc did not support decorators on a parameter. Thanks to @dsherret, the parser gets abillity to handle it.
The code below is valid, and
swc now supports the syntax. Implemented by @dsherret.
Riccardo Dambrosio sent me an email which contains how can I improve the performance of parser. Based on the fact that 99% of input is ascii, he suggested short-circuiting ascii letters in the lexer.
I've tested it and it makes the parser of
swc 10% ~ 13% faster.