Skip to content

Conversation

@kdy1
Copy link
Member

@kdy1 kdy1 commented Apr 20, 2025

Description:

I expect this to improve the performance of the parser greatly.

cc @bvanjoi
Can you help with this task?

@kdy1 kdy1 added this to the Planned milestone Apr 20, 2025
@kdy1 kdy1 self-assigned this Apr 20, 2025
@changeset-bot
Copy link

changeset-bot bot commented Apr 20, 2025

⚠️ No Changeset found

Latest commit: 47f9cff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@bvanjoi
Copy link
Contributor

bvanjoi commented Apr 21, 2025

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,
Copy link
Contributor

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

@kdy1
Copy link
Member Author

kdy1 commented May 12, 2025

Closing in favor of #10399

@kdy1 kdy1 closed this May 12, 2025
@kdy1 kdy1 deleted the kdy1/parser-token branch May 12, 2025 19:55
@kdy1 kdy1 modified the milestones: Planned, v1.11.28 May 20, 2025
@swc-project swc-project locked as resolved and limited conversation to collaborators Jun 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants