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

Parse octal number literals #7

Closed
strager opened this issue Sep 11, 2020 · 2 comments · Fixed by #40
Closed

Parse octal number literals #7

strager opened this issue Sep 11, 2020 · 2 comments · Fixed by #40
Assignees
Labels
good first issue Good for newcomers and C++ beginners

Comments

@strager
Copy link
Collaborator

strager commented Sep 11, 2020

quick-lint-js understands hexadecimal, binary, and decimal number literals, but doesn't understand octal number literals.

Teach quick-lint-js to parse octal number literals in lex.cpp and in test-lex.cpp.

@strager strager added the good first issue Good for newcomers and C++ beginners label Sep 11, 2020
@vegerot
Copy link
Contributor

vegerot commented Sep 12, 2020

dibs

@vegerot
Copy link
Contributor

vegerot commented Sep 12, 2020

strict and non-strict mode parse octal literals differently. In non-strict mode 057===46, but 058===58. In strict mode 058 throws a SyntaxError`.

I'm not sure how we handle strict mode in quick-lint (but in chat you just told me we don't) it. butt u also just sed in chat to allow the stupid format too (until we track strict mode). so nvm

vegerot referenced this issue in vegerot/quick-lint-js Sep 21, 2020
Wrote this script as part of https://github.com/strager/quick-lint-js/issues/7 , and figured since I
wrote this anyways, might as well share it
vegerot referenced this issue in vegerot/quick-lint-js Sep 21, 2020
Wrote this script as part of https://github.com/strager/quick-lint-js/issues/7 , and figured since I
wrote this anyways, might as well share it
strager referenced this issue Sep 23, 2020
Wrote this script as part of https://github.com/strager/quick-lint-js/issues/7 , and figured since I
wrote this anyways, might as well share it
@strager strager linked a pull request Oct 17, 2020 that will close this issue
@strager strager added this to the public release (v1.0) milestone Oct 29, 2020
strager added a commit that referenced this issue Sep 8, 2021
The FS change detection thread continues running until the JavaScript VM
garbage-collects the qljs_workspace object. I think this is causing
tests to be flaky on CI through this series of events:

1. test A: create temp dir
2. test A: create workspace; start background thread
3. test A: watch some files for changes
4. test A: delete temp dir
5. test B: mock error pop-ups
6. test A background thread: notice changes from step #4
7. test A background thread: report I/O error using pop-up
8. test B: notice spurious pop-up frop step #7; fail test

Teach qljs_workspace::dispose to clean up the FS change detection thread
promptly. This should make tests more deterministic (because behavior
relies less on the JS garbage collector).
strager added a commit that referenced this issue Sep 8, 2021
The FS change detection thread continues running until the JavaScript VM
garbage-collects the qljs_workspace object. I think this is causing
tests to be flaky on CI through this series of events:

1. test A: create temp dir
2. test A: create workspace; start background thread
3. test A: watch some files for changes
4. test A: delete temp dir
5. test B: mock error pop-ups
6. test A background thread: notice changes from step #4
7. test A background thread: report I/O error using pop-up
8. test B: notice spurious pop-up frop step #7; fail test

Teach qljs_workspace::dispose to clean up the FS change detection thread
promptly. This should make tests more deterministic (because behavior
relies less on the JS garbage collector).
strager added a commit that referenced this issue Sep 8, 2021
The FS change detection thread continues running until the JavaScript VM
garbage-collects the qljs_workspace object. I think this is causing
tests to be flaky on CI through this series of events:

1. test A: create temp dir
2. test A: create workspace; start background thread
3. test A: watch some files for changes
4. test A: delete temp dir
5. test B: mock error pop-ups
6. test A background thread: notice changes from step #4
7. test A background thread: report I/O error using pop-up
8. test B: notice spurious pop-up frop step #7; fail test

Teach qljs_workspace::dispose to clean up the FS change detection thread
promptly. This should make tests more deterministic (because behavior
relies less on the JS garbage collector).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers and C++ beginners
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants