summaryrefslogtreecommitdiff
path: root/libstd/intparse.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-01-23 10:43:33 -0500
committerOri Bernstein <ori@eigenstate.org>2014-01-23 10:43:33 -0500
commit22824dad97a68c10ce71cf7e623a12e51be80c43 (patch)
treebcdd6e06fe425da80a38ed969a2cf8f6e28ed540 /libstd/intparse.myr
parent6df4ee6319d8c943d766e99f231908831421e403 (diff)
downloadmc-22824dad97a68c10ce71cf7e623a12e51be80c43.tar.gz
Allow '_' as digit separator within integers.
Diffstat (limited to 'libstd/intparse.myr')
-rw-r--r--libstd/intparse.myr3
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)))