json: fix #1751; support unsigned integers

This commit is contained in:
Robin Martijn 2019-08-26 17:01:23 +02:00 committed by Alexander Medvednikov
parent f34d14d901
commit 5df31c16f7
2 changed files with 47 additions and 1 deletions

View file

@ -124,7 +124,8 @@ string res = tos2("");
fn is_js_prim(typ string) bool {
return typ == 'int' || typ == 'string' ||
typ == 'bool' || typ == 'f32' || typ == 'f64' ||
typ == 'i8' || typ == 'i16' || typ == 'i32' || typ == 'i64'
typ == 'i8' || typ == 'i16' || typ == 'i32' || typ == 'i64' ||
typ == 'u8' || typ == 'u16' || typ == 'u32' || typ == 'u64'
}
fn (p mut Parser) decode_array(array_type string) string {