Skip to content
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

Implement parsing for flow enums #708

Merged
merged 2 commits into from
Jun 25, 2022
Merged

Conversation

alangpierce
Copy link
Owner

Progress toward #701

This is based largely off of the Babel implementation, and handles various cases
with ellipses, of declarations, assignments, and enums as part of named and
default exports.

I also changed the token test to make it easier to copy and paste the error
output to get a starting point for the tokens.

Progress toward #701

This is based largely off of the Babel implementation, and handles various cases
with ellipses, `of` declarations, assignments, and enums as part of named and
default exports.

I also changed the token test to make it easier to copy and paste the error
output to get a starting point for the tokens.
@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #708 (159b2e0) into main (210bee9) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #708      +/-   ##
==========================================
+ Coverage   84.73%   84.83%   +0.09%     
==========================================
  Files          54       54              
  Lines        5771     5801      +30     
  Branches     1314     1323       +9     
==========================================
+ Hits         4890     4921      +31     
  Misses        597      597              
+ Partials      284      283       -1     
Impacted Files Coverage Δ
src/parser/tokenizer/readWordTree.ts 100.00% <ø> (ø)
src/parser/plugins/flow.ts 65.77% <100.00%> (+1.85%) ⬆️
src/parser/tokenizer/keywords.ts 100.00% <100.00%> (ø)
src/parser/traverser/statement.ts 82.65% <100.00%> (+0.08%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@github-actions
Copy link

github-actions bot commented Jun 25, 2022

Benchmark results

Before this PR: 353.8 thousand lines per second
After this PR: 354 thousand lines per second

Measured change: 0.03% faster (0.7% slower to 0.52% faster)
Summary: Likely no significant difference

@alangpierce alangpierce merged commit 00e7ed6 into main Jun 25, 2022
@alangpierce alangpierce deleted the implement-flow-enum-parsing branch June 25, 2022 00:46
1Lighty pushed a commit to Astra-mod/sucrase that referenced this pull request Aug 14, 2022
Progress toward alangpierce#701

This is based largely off of the Babel implementation, and handles various cases
with ellipses, `of` declarations, assignments, and enums as part of named and
default exports.

I also changed the token test to make it easier to copy and paste the error
output to get a starting point for the tokens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant