diff options
Diffstat (limited to 'lib/system/reprjs.nim')
-rw-r--r-- | lib/system/reprjs.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/reprjs.nim b/lib/system/reprjs.nim index 658220c11..d04d6e12b 100644 --- a/lib/system/reprjs.nim +++ b/lib/system/reprjs.nim @@ -35,7 +35,7 @@ proc isUndefined[T](x: T): bool {.inline.} = {.emit: "`result` = `x` === undefin proc reprEnum(e: int, typ: PNimType): string {.compilerRtl.} = if not typ.node.sons[e].isUndefined: - result = $typ.node.sons[e].name + result = makeNimstrLit(typ.node.sons[e].name) else: result = $e & " (invalid data!)" @@ -55,11 +55,11 @@ proc reprStrAux(result: var string, s: cstring, len: int) = case c of '"': add(result, "\\\"") of '\\': add(result, "\\\\") - of '\10': add(result, "\\10\"\n\"") - of '\127'..'\255', '\0'..'\9', '\11'..'\31': - add( result, "\\" & reprInt(ord(c)) ) + #of '\10': add(result, "\\10\"\n\"") + of '\127'..'\255', '\0'..'\31': + add(result, "\\" & reprInt(ord(c))) else: - add( result, reprInt(ord(c)) ) # Not sure about this. + add(result, c) add(result, "\"") proc reprStr(s: string): string {.compilerRtl.} = |