Skip to content

Commit

Permalink
[ruby/prism] Provide more documentation for pm_integer_parse_digit_va…
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed Mar 11, 2024
1 parent 2dfa95a commit 6242a82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prism/util/pm_integer.c
Expand Up @@ -223,6 +223,10 @@ karatsuba_multiply(pm_integer_t *destination, pm_integer_t *left, pm_integer_t *

/**
* The values of a hexadecimal digit, where the index is the ASCII character.
* Note that there's an odd exception here where _ is mapped to 0. This is
* because it's possible for us to end up trying to parse a number that has
* already had an error attached to it, and we want to provide _something_ to
* the user.
*/
static const int8_t pm_integer_parse_digit_values[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
Expand Down

0 comments on commit 6242a82

Please sign in to comment.