Skip to content

Conversation

Mouradif
Copy link

@Mouradif Mouradif commented Jul 8, 2019

Followed @eddiesholl 's advice for the state.terminate() method in this comment : #20 (comment)
as well as @davidbonnet 's warning on sensitive characters and on that, I followed instructions from eslint where the semicolon would be put right before a (, [ or a - on the next statement

fix #20

@codecov-io
Copy link

codecov-io commented Jul 8, 2019

Codecov Report

Merging #73 into master will decrease coverage by 0.08%.
The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage   95.45%   95.36%   -0.09%     
==========================================
  Files           1        1              
  Lines         550      561      +11     
==========================================
+ Hits          525      535      +10     
- Misses         25       26       +1
Impacted Files Coverage Δ
src/astring.js 95.36% <95.83%> (-0.09%) ⬇️

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 bcb9c0d...e8ffc2a. Read the comment docs.

Copy link
Owner

@davidbonnet davidbonnet left a comment

Choose a reason for hiding this comment

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

Thanks @Mouradif for suggesting these changes.

Quickly added some tests that stress the semicolon placement algorithm. Suggested approach is to have a special write method used in places where one of these characters is inserted: '[(+-'.

Note also that writeToStream, writeAndMap, and writeToStreamAndMap should apply the same logic, thus requiring perhaps a formatCode method to be used in all three.

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.

Control of semicolon behaviour

4 participants