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 Binary Parsing Support & Refactor TryGetNumberValue & ScanNumberHelper #7993

Merged
merged 54 commits into from Apr 3, 2019
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2ef76c9
Add generic utility functions for safely cross-converting numeric types
vexx32 Sep 29, 2018
d9e8e09
Add CharTraits flag for binary digit
vexx32 Sep 29, 2018
76c1812
Add NumberSuffixFlags for BigInt
vexx32 Sep 29, 2018
8628806
Add extended hex and binary parsing tests
vexx32 Sep 29, 2018
fc9e5cd
Fix decimal parsing issue where 0_00 would fail to parse
vexx32 Sep 29, 2018
2b00b64
Style & spacing fixes
vexx32 Sep 29, 2018
c7c129f
Trim complex logic & fix issues
vexx32 Sep 29, 2018
f737d30
Further parse optimizations
vexx32 Oct 4, 2018
3e92c0d
Introduce local for clarity in ScanNumberHelper
vexx32 Oct 4, 2018
dd558a3
Update parser tests for underscore formats
vexx32 Oct 4, 2018
5bbe98f
Optimize ParseBinary & tokenizer parsing cases
vexx32 Oct 4, 2018
bbf76c5
Minor Fixes post-rebase
vexx32 Oct 11, 2018
738c33e
Whitespace / style fixes for clarirt & StyleCop
vexx32 Oct 12, 2018
4f68e43
Address review comments
vexx32 Oct 12, 2018
52f7739
Refactor for efficiency per @iSazonov's recommendation
vexx32 Oct 12, 2018
c537855
Update comment
vexx32 Oct 12, 2018
26248e6
Update AsBigInt extension method
vexx32 Oct 12, 2018
dca6c6d
Pre-insert leading 0 to hex literals in ScanNumberHelper
vexx32 Oct 13, 2018
d59fd89
Update ParseBinary to use spans throughout
vexx32 Oct 14, 2018
5eb6bf6
Use stackalloc for small binary numerals
vexx32 Oct 15, 2018
63ffd97
Add comments
vexx32 Oct 15, 2018
abc3e0b
Fix glitch with `0b1` in binary parser
vexx32 Oct 15, 2018
5d34f9e
Rename variables for clarity
vexx32 Oct 16, 2018
f358087
Tidy and consolidate comments for binary parser
vexx32 Oct 16, 2018
f66218d
Add comments and format code for readability
vexx32 Oct 17, 2018
1dd414e
Fix decimal literal parsing into double
vexx32 Oct 22, 2018
8223a6a
Remove underscore parsing per Committee decision
vexx32 Nov 29, 2018
e74c4a1
Use `n`/`N` suffix for bigint instead of `I`
vexx32 Nov 29, 2018
1c16a15
Restore test
vexx32 Nov 29, 2018
d03a4b9
Prevent hex and binary automatically parsing as decimal
vexx32 Nov 29, 2018
8bbe0e3
Swap `i`->`n` bigint suffix in tests
vexx32 Nov 29, 2018
b1b246c
Alphabetize using statements in Utils.cs
vexx32 Nov 29, 2018
cccd610
Update CharTratis enum with proper documentation headers
vexx32 Nov 29, 2018
f555a2f
Re-add missing using statement
vexx32 Dec 3, 2018
6b72b94
Refactor to address review comments
vexx32 Dec 4, 2018
917af3d
Define start index based on allocated bytes
vexx32 Dec 5, 2018
169d687
Revert refactor for readability
vexx32 Dec 5, 2018
1b52625
Small refactor for readability and logical cohesion.
vexx32 Dec 7, 2018
68f0a87
Replace variable name for readability
vexx32 Dec 8, 2018
f7c16e5
Merge branch 'master' into Tokenizer/Refactor
vexx32 Dec 20, 2018
6e1711b
Merge branch 'master' into Tokenizer/Refactor
vexx32 Dec 28, 2018
5ecdf52
Merge branch 'master' into Tokenizer/Refactor
vexx32 Jan 1, 2019
e08ad0b
Merge branch 'master' into Tokenizer/Refactor
vexx32 Jan 12, 2019
270f6a0
Merge branch 'master' into Tokenizer/Refactor
vexx32 Jan 18, 2019
ecc37bd
:white_check_mark: Update tests to use errorID
vexx32 Jan 30, 2019
959e52c
:pencil: Use correct ErrorID for should -throw
vexx32 Jan 30, 2019
99ec56d
:pencil: Fix last failing test
vexx32 Jan 30, 2019
091df16
:sparkles: Use suggested pattern for binary/decimal digits
vexx32 Jan 31, 2019
684cc31
:white_check_mark: Add more tests for hex parsing
vexx32 Jan 31, 2019
8822139
:recycle: Address Rob's feedback
vexx32 Feb 12, 2019
ec2e105
:memo: Add comment to clarify why less readable method is used.
vexx32 Feb 12, 2019
07649fb
Empty commit to restart CI
vexx32 Feb 12, 2019
c2c5e64
Merge branch 'Tokenizer/Refactor' of https://github.com/vexx32/PowerS…
vexx32 Feb 12, 2019
4f4cf22
Merge branch 'master' into Tokenizer/Refactor
vexx32 Mar 4, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

♻️ Address Rob's feedback

  • Loading branch information...
vexx32 committed Feb 12, 2019
commit 882213996e0875362c173f7428bd7dd406a46f1a
@@ -3714,7 +3714,8 @@ private void ScanNumberAfterDot(StringBuilder sb, ref int signIndex, ref bool no
result = dmValue;
return true;
}
else if (Utils.TryCast(bigValue, out double d))

if (Utils.TryCast(bigValue, out double d))
{
result = d;
return true;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.