-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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 support for Byte Literals #7901
Conversation
@vexx32 Please open Issue in docs repo and add link to the PR description |
CodeFactor issues remaining are just in missing documentation in the enum; I can either add that to this PR or address it in follow-up PR with the rest of the changes. I would prefer to keep this one minimal, however. 😄 |
@vexx32 Feel free to address CodeFactor issues. |
f18d2b5
to
3bb577a
Compare
Rebased for CIs && added |
Use specific combined flag names in parsing cases Add (s)byte parsing cases for TryGetNumberValue
Remove impossible tests Rework byte parsing shortcut Fix failing test scenario caused by hex parse handling of multiplier Simplify return by ignoring multuplier for (s)byte-suffixed values Add comment for negative multiplier possibility Still need to utilise multiplier for signed byte case Multiplier can determine negative in signed byte cases with hex Adjust byte parse shortcuts Add comments
Add summary headers to enum and values
3bb577a
to
d664649
Compare
@daxian-dbw Could you please review the next step PR? After that we could continue and implement previously planned performance optimizations for the code in follow PR. |
@TravisEz13 you fellas are free to pore over it one more time, but just in case you weren't aware / didn't recall, it has been discussed a good bit and reviewed by the committee in terms of the concept over in #7557 😄 |
@TravisEz13 is there something specific you need the @PowerShell/powershell-committee to review for this PR? |
@SteveL-MSFT This is marked as a breaking change. The issue linked is not marked as reviewed. Looking back at the issue, it looks like this portion of the design was reviewed. Is that correct? |
@TravisEz13 sorry for the confusion; I requested the committee further review the ensuing discussion regarding possibly supporting underscore literal syntax and native BigInteger values. This portion was reviewed, aye. 😃 |
@daxian-dbw Could you please look the PR before we merge? |
- Adds y suffix that is used to specify a numeric literal as the sbyte data type. - Can be combined with the existing u suffix as uy to specify the byte data type.
PR Summary
y
suffix that is used to specify a numeric literal as thesbyte
data type.u
suffix asuy
to specify thebyte
data typeExamples:
N.B.: I believe this will be a breaking change, as it means some command names (specifically, numerals suffixed with a y such as
100y
) will now be interpreted as numerals instead of potential function or command names.Ref: #7557 -- This will resolve the first part of that issue. The second portion of that issue will be solved in a follow-up PR where binary literal support is added.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.[feature]
if the change is significant or affects feature tests