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

fixes #23513, parseutils.nim: parseInt's doc example. #23561

Merged
merged 6 commits into from
Jun 12, 2024

Conversation

litlighilit
Copy link
Contributor

@litlighilit litlighilit commented May 2, 2024

fixes #23513

Also, the old runnableExample is just a copy of proc parseInt(openArray[char], var int, int) variant (in Line 1000).

litlighilit and others added 3 commits May 2, 2024 15:37
Its doc used to render wrongly where `>` is considered as quote block.
Also, the old `runnableExample` is just a copy of `proc parseInt(openArray[char], var int, int)` variant (in Line 1000).
@litlighilit
Copy link
Contributor Author

litlighilit commented May 9, 2024

I find...

  • Any procedure that's related to parse some integers handles underline _ (e.g. parseOct/parseHex 1 )
  • parseInt parseBiggestInt handles leading sign character +/-.

Mentioned in here

I think we shall either:

  • Mention what they can handle in their doc comments
  • Or just reflect these in runnableExamples as they used to do.

Footnotes

  1. This is reflected in their runnableExamples

@litlighilit
Copy link
Contributor Author

  • Or just reflect these in runnableExamples as they used to do.

Currently I've added examples for all parseInt/parseBiggestInt variants in std/parseutils

@litlighilit
Copy link
Contributor Author

ping @ringabout

@litlighilit
Copy link
Contributor Author

litlighilit commented Jun 11, 2024

@ringabout
any improvement needed?


If such a feature is really required to be metioned in doc comment, not only runnableExamples, then I'll update all doc of these procs metioned here.

@ringabout ringabout merged commit 3915fdc into nim-lang:devel Jun 12, 2024
19 checks passed
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 3915fdc

Hint: mm: orc; opt: speed; options: -d:release
178743 lines; 8.471s; 664.648MiB peakmem

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.

parseInt accepts more than digits
2 participants