# HG changeset patch # User Michael Pavone # Date 1439008808 25200 # Node ID 3d36d69aab7f088250a19f411cc16305ce85003f # Parent e44f65abaf0ed42c229d99e4c37a78c06cb66ea3 Fix JSON decoder to align with language changes diff -r e44f65abaf0e -r 3d36d69aab7f modules/json.tp --- a/modules/json.tp Sun Apr 26 11:16:14 2015 -0700 +++ b/modules/json.tp Fri Aug 07 21:40:08 2015 -0700 @@ -18,7 +18,7 @@ t <- "t" byte: 0 f <- "f" byte: 0 - parseNumAt <- :str :at :recvResult { + parseNumAt <- :str at { num <- 0 l <- str length minus <- false @@ -56,7 +56,7 @@ } } - parseStrAt <- :src :at :recvResult { + parseStrAt <- :src at { //TODO: Deal with escaped characters end <- src find: "\"" startingAt: at + 1 else: { src length } #{ @@ -69,10 +69,10 @@ ret <- false b <- text byte: cur if: b = neg || b >= zero && b <= nine { - text parseNumAt: cur + parseNumAt: text cur } else: { if: b = quote { - text parseStrAt: cur + parseStrAt: text cur } else: { if: b = startArr { len <- text length