-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
perf(es/parser): Defne Token as TokenType + TokenValue
#10397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
OK, I understand the meaning of this change. I will create a new PR to implement it. |
| pub kind: TokenType, | ||
| pub span: Span, | ||
| /// Had a line break before this token? | ||
| pub had_line_break: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had_line_break also can move into Parser::state, see: https://github.com/microsoft/TypeScript/blob/main/src/compiler/scanner.ts#L1071
|
Closing in favor of #10399 |
Description:
I expect this to improve the performance of the parser greatly.
cc @bvanjoi
Can you help with this task?