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

Add null as reserved word in enum emit, other follow-ups #657

Merged
merged 1 commit into from Oct 18, 2021

Conversation

alangpierce
Copy link
Owner

Follow-up to #656:

  • Add null as a new case that should not have a variable declared in enum
    emit.
  • Rearrange the declaration to group these special non-identifier literals.
  • Add a test, also confirming that undefined is not reserved here.
  • Add a jsdoc comment for isIdentifier.

Follow-up to #656:
* Add `null` as a new case that should not have a variable declared in enum
  emit.
* Rearrange the declaration to group these special non-identifier literals.
* Add a test, also confirming that `undefined` is *not* reserved here.
* Add a jsdoc comment for `isIdentifier`.
@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #657 (779cf34) into main (6aba006) will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #657      +/-   ##
==========================================
- Coverage   82.65%   82.58%   -0.08%     
==========================================
  Files          56       56              
  Lines        5928     5690     -238     
  Branches     1344     1344              
==========================================
- Hits         4900     4699     -201     
+ Misses        745      708      -37     
  Partials      283      283              
Impacted Files Coverage Δ
src/util/isIdentifier.ts 100.00% <ø> (ø)
src/Options-gen-types.ts 75.00% <0.00%> (-25.00%) ⬇️
src/parser/index.ts 77.77% <0.00%> (-7.94%) ⬇️
src/computeSourceMap.ts 83.33% <0.00%> (-5.56%) ⬇️
src/util/getNonTypeIdentifiers.ts 94.44% <0.00%> (-5.56%) ⬇️
src/parser/plugins/types.ts 91.66% <0.00%> (-3.34%) ⬇️
src/parser/tokenizer/readWord.ts 82.35% <0.00%> (-3.02%) ⬇️
src/parser/traverser/util.ts 83.33% <0.00%> (-2.95%) ⬇️
src/parser/traverser/base.ts 95.45% <0.00%> (-1.69%) ⬇️
src/parser/traverser/statement.ts 82.16% <0.00%> (-0.44%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6aba006...779cf34. Read the comment docs.

@github-actions
Copy link

Benchmark results

Before this PR: 266 thousand lines per second
After this PR: 270.9 thousand lines per second

Measured change: 1.85% faster (0.66% faster to 9.14% faster)
Summary: Probably faster

@alangpierce alangpierce merged commit 018ee1d into main Oct 18, 2021
@alangpierce alangpierce deleted the add-null-enum-reserved-word branch October 18, 2021 03:42
@alangpierce
Copy link
Owner Author

Published as 3.20.3.

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.

None yet

1 participant