Skip to content

Conversation

@cjorge-graphops
Copy link
Contributor

Expose literal.ParseNum via pkg/strconv so CUE code can parse native number literals through the standard library. The wrapper returns an internal.Decimal and surfaces syntax issues as *strconv.NumError, matching the existing ParseInt/ParseFloat helpers.

Expose literal.ParseNum via pkg/strconv so CUE code can parse native
number literals through the standard library. The wrapper returns an
internal.Decimal and surfaces syntax issues as *strconv.NumError, matching
the existing ParseInt/ParseFloat helpers.

Signed-off-by: Carlos Jorge <[email protected]>
@mvdan mvdan self-assigned this Nov 5, 2025
Copy link
Member

@mvdan mvdan left a comment

Choose a reason for hiding this comment

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

Thanks! This looks fine from a first review. I'll import into Gerrit for a final review.

@mvdan
Copy link
Member

mvdan commented Nov 11, 2025

@mvdan
Copy link
Member

mvdan commented Nov 12, 2025

Ended up renaming it to ParseNumber, for the sake of not shortening the name from the CUE spec.

@cueckoo cueckoo closed this in aec0116 Nov 12, 2025
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.

2 participants