diff options
author | Ori Bernstein <ori@eigenstate.org> | 2014-01-23 10:43:33 -0500 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2014-01-23 10:43:33 -0500 |
commit | 22824dad97a68c10ce71cf7e623a12e51be80c43 (patch) | |
tree | bcdd6e06fe425da80a38ed969a2cf8f6e28ed540 /libstd/intparse.myr | |
parent | 6df4ee6319d8c943d766e99f231908831421e403 (diff) | |
download | mc-22824dad97a68c10ce71cf7e623a12e51be80c43.tar.gz |
Allow '_' as digit separator within integers.
Diffstat (limited to 'libstd/intparse.myr')
-rw-r--r-- | libstd/intparse.myr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libstd/intparse.myr b/libstd/intparse.myr index 991a336..6794891 100644 --- a/libstd/intparse.myr +++ b/libstd/intparse.myr @@ -50,6 +50,9 @@ generic doparse = {s, isneg, base v = 0 while s.len != 0 (c, s) = striter(s) + if c == '_' + continue + ;; cv = charval(c, base) if cv >= 0 v *= (base castto(@a::(tcint,tcnum,tctest))) |