mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 18:33:36 +00:00
unicode support port wip
This commit is contained in:
@@ -256,7 +256,7 @@
|
||||
node += "*"
|
||||
i++
|
||||
|
||||
else if (copytext(token(i), 1, 2) == "/")
|
||||
else if(token(i)[1] == "/")
|
||||
i = object_type(i, node)
|
||||
|
||||
else
|
||||
@@ -377,7 +377,7 @@
|
||||
//object_type: <type path>
|
||||
/datum/SDQL_parser/proc/object_type(i, list/node)
|
||||
|
||||
if (copytext(token(i), 1, 2) != "/")
|
||||
if(token(i)[1] != "/")
|
||||
return parse_error("Expected type, but it didn't begin with /")
|
||||
|
||||
var/path = text2path(token(i))
|
||||
@@ -416,7 +416,7 @@
|
||||
//string: ''' <some text> ''' | '"' <some text > '"'
|
||||
/datum/SDQL_parser/proc/string(i, list/node)
|
||||
|
||||
if(copytext(token(i), 1, 2) in list("'", "\""))
|
||||
if(token(i)[1] in list("'", "\""))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
@@ -427,7 +427,7 @@
|
||||
//array: '[' expression, expression, ... ']'
|
||||
/datum/SDQL_parser/proc/array(var/i, var/list/node)
|
||||
// Arrays get turned into this: list("[", list(exp_1a = exp_1b, ...), ...), "[" is to mark the next node as an array.
|
||||
if(copytext(token(i), 1, 2) != "\[")
|
||||
if(token(i)[1] != "\[")
|
||||
parse_error("Expected an array but found '[token(i)]'")
|
||||
return i + 1
|
||||
|
||||
@@ -613,7 +613,7 @@
|
||||
node += "null"
|
||||
i++
|
||||
|
||||
else if(lowertext(copytext(token(i), 1, 3)) == "0x" && isnum(hex2num(copytext(token(i), 3))))
|
||||
else if(lowertext(copytext(token(i), 1, 3)) == "0x" && isnum(hex2num(copytext(token(i), 3))))//3 == length("0x") + 1
|
||||
node += hex2num(copytext(token(i), 3))
|
||||
i++
|
||||
|
||||
@@ -621,12 +621,12 @@
|
||||
node += text2num(token(i))
|
||||
i++
|
||||
|
||||
else if(copytext(token(i), 1, 2) in list("'", "\""))
|
||||
else if(token(i)[1] in list("'", "\""))
|
||||
i = string(i, node)
|
||||
|
||||
else if(copytext(token(i), 1, 2) == "\[") // Start a list.
|
||||
else if(token(i)[1] == "\[") // Start a list.
|
||||
i = array(i, node)
|
||||
else if(copytext(token(i), 1, 2) == "/")
|
||||
else if(token(i)[1] == "/")
|
||||
i = object_type(i, node)
|
||||
else
|
||||
i = variable(i, node)
|
||||
|
||||
Reference in New Issue
Block a user