nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Update libs to use correctly ascii and code_point
[nit.git]
/
lib
/
json
/
static.nit
diff --git
a/lib/json/static.nit
b/lib/json/static.nit
index
fdb9f65
..
966f2c9
100644
(file)
--- a/
lib/json/static.nit
+++ b/
lib/json/static.nit
@@
-99,22
+99,22
@@
redef class Text
buffer.append "\\\""
else if char == '\/' then
buffer.append "\\/"
buffer.append "\\\""
else if char == '\/' then
buffer.append "\\/"
- else if char < 16.ascii then
+ else if char < 16.code_point then
if char == '\n' then
buffer.append "\\n"
else if char == '\r' then
buffer.append "\\r"
else if char == '\t' then
buffer.append "\\t"
if char == '\n' then
buffer.append "\\n"
else if char == '\r' then
buffer.append "\\r"
else if char == '\t' then
buffer.append "\\t"
- else if char == 0x0C.ascii then
+ else if char == 0x0C.code_point then
buffer.append "\\f"
buffer.append "\\f"
- else if char == 0x08.ascii then
+ else if char == 0x08.code_point then
buffer.append "\\b"
else
buffer.append "\\b"
else
- buffer.append "\\u000{char.ascii.to_hex}"
+ buffer.append "\\u000{char.code_point.to_hex}"
end
else if char < ' ' then
end
else if char < ' ' then
- buffer.append "\\u00{char.ascii.to_hex}"
+ buffer.append "\\u00{char.code_point.to_hex}"
else
buffer.add char
end
else
buffer.add char
end
@@
-435,9
+435,9
@@
redef class Nstring
i += 1
char = text[i]
if char == 'b' then
i += 1
char = text[i]
if char == 'b' then
- char = 0x08.ascii
+ char = 0x08.code_point
else if char == 'f' then
else if char == 'f' then
- char = 0x0C.ascii
+ char = 0x0C.code_point
else if char == 'n' then
char = '\n'
else if char == 'r' then
else if char == 'n' then
char = '\n'
else if char == 'r' then
@@
-450,7
+450,7
@@
redef class Nstring
if code >= 128 then
char = '?'
else
if code >= 128 then
char = '?'
else
- char = code.ascii
+ char = code.code_point
end
i += 4
end
end
i += 4
end