Skip to content

Handle comment directives in incremental parsing #37632

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

Merged
merged 2 commits into from
Mar 27, 2020
Merged

Conversation

sheetalkamat
Copy link
Member

Fixes #37536

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

Comment on lines +7860 to +7865
if (!commentDirectives) {
commentDirectives = newDirectives;
}
else if (newDirectives) {
commentDirectives.push(...newDirectives);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think concatenate in core can handle this in a single call, similarly to append

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one creates new array if both arrays are !undefined which is what this avoids since anyways we already have new array

@sheetalkamat sheetalkamat merged commit 7f59949 into master Mar 27, 2020
@sheetalkamat sheetalkamat deleted the commentDirective branch March 27, 2020 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@ts-ignore stops in editing (regression)
3 participants