Support separators in floating point literals#1385
Merged
dcodeIO merged 10 commits intoAssemblyScript:masterfrom Jul 13, 2020
Merged
Support separators in floating point literals#1385dcodeIO merged 10 commits intoAssemblyScript:masterfrom
dcodeIO merged 10 commits intoAssemblyScript:masterfrom
Conversation
MaxGraey
reviewed
Jul 10, 2020
MaxGraey
reviewed
Jul 10, 2020
MaxGraey
reviewed
Jul 10, 2020
MaxGraey
reviewed
Jul 10, 2020
added 2 commits
July 10, 2020 16:28
MaxGraey
approved these changes
Jul 10, 2020
dcodeIO
reviewed
Jul 10, 2020
dcodeIO
reviewed
Jul 10, 2020
dcodeIO
reviewed
Jul 10, 2020
MaxGraey
reviewed
Jul 11, 2020
pulpdrew
commented
Jul 11, 2020
| readDecimalFloat(): f64 { | ||
| // TODO: numeric separators (parseFloat can't handle these) | ||
| var text = this.source.text; | ||
| var pos = this.pos; |
Contributor
Author
There was a problem hiding this comment.
This local variable pos was added in #1376 , but made using a helper function awkward. I could either:
- leave things how I have them now
- use a local pos and do
this.pos = posbefore each call to the helper andpos = this.posafter each call to the helper - eliminate the helper function and just inline it all in this function.
- pass a
startargument into the helper (but that still leaves the problem of returning the end position, since I am already using the return value for indicating whether a separator is present).
Thoughts?
Member
There was a problem hiding this comment.
Yeah, that's caching this.pos is made some thing little complicated but it's speedup self-bootstrap version of AS. I suggest leave all as is because that cacheing most significant only for unsafeNext which changes really rarely. Other methods can leave as is for simplicity
MaxGraey
reviewed
Jul 13, 2020
Member
|
Thank you! :) |
|
🎉 This PR is included in version 0.13.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes #1059