mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
/vg/ Multitool menu port!
With 100% better squashing. I hope.
This commit is contained in:
@@ -26,7 +26,7 @@ json_reader
|
||||
src.json = json
|
||||
. = new/list()
|
||||
src.i = 1
|
||||
while(src.i <= lentext(json))
|
||||
while(src.i <= length(json))
|
||||
var/char = get_char()
|
||||
if(is_whitespace(char))
|
||||
i++
|
||||
@@ -44,7 +44,7 @@ json_reader
|
||||
|
||||
read_word()
|
||||
var/val = ""
|
||||
while(i <= lentext(json))
|
||||
while(i <= length(json))
|
||||
var/char = get_char()
|
||||
if(is_whitespace(char) || symbols.Find(char))
|
||||
i-- // let scanner handle this character
|
||||
@@ -56,7 +56,7 @@ json_reader
|
||||
var
|
||||
escape = FALSE
|
||||
val = ""
|
||||
while(++i <= lentext(json))
|
||||
while(++i <= length(json))
|
||||
var/char = get_char()
|
||||
if(escape)
|
||||
escape=FALSE // WHICH STUPID ASSHOLE FORGOT THIS - N3X
|
||||
@@ -101,6 +101,13 @@ json_reader
|
||||
return 48 <= c && c <= 57 || char == "+" || char == "-"
|
||||
|
||||
|
||||
// parser
|
||||
ReadArray(list/tokens)
|
||||
src.tokens = tokens
|
||||
i = 1
|
||||
return read_array()
|
||||
|
||||
|
||||
// parser
|
||||
ReadObject(list/tokens)
|
||||
src.tokens = tokens
|
||||
|
||||
Reference in New Issue
Block a user