Revert "Merge pull request #838 from ArchieBeepBoop/test1"

This reverts commit b0dbacee82, reversing
changes made to 813a2ea1c7.
This commit is contained in:
QuoteFox
2021-01-08 19:28:18 +00:00
parent f1fbb326f9
commit 08c8f744a9
141 changed files with 12694 additions and 12700 deletions
+15 -16
View File
@@ -862,8 +862,8 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
else if(ispath(expression[i]))
val = expression[i]
else if(expression[i][1] in list("'", "\""))
val = copytext_char(expression[i], 2, -1)
else if(copytext(expression[i], 1, 2) in list("'", "\""))
val = copytext(expression[i], 2, length(expression[i]))
else if(expression[i] == "\[")
var/list/expressions_list = expression[++i]
@@ -954,11 +954,11 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
if(is_proper_datum(object))
D = object
if (object == world && (!long || expression[start + 1] == ".") && !(expression[start] in exclude)) //3 == length("SS") + 1
if (object == world && (!long || expression[start + 1] == ".") && !(expression[start] in exclude))
to_chat(usr, "<span class='danger'>World variables are not allowed to be accessed. Use global.</span>")
return null
else if(expression [start] == "{" && long) //3 == length("0x") + 1
else if(expression [start] == "{" && long)
if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x")
to_chat(usr, "<span class='danger'>Invalid pointer syntax: [expression[start + 1]]</span>")
return null
@@ -1063,10 +1063,9 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
var/word = ""
var/list/query_list = list()
var/len = length(query_text)
var/char = ""
for(var/i = 1, i <= len, i += length(char))
char = query_text[i]
for(var/i = 1, i <= len, i++)
var/char = copytext(query_text, i, i + 1)
if(char in whitespace)
if(word != "")
@@ -1085,7 +1084,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
query_list += word
word = ""
var/char2 = query_text[i + length(char)]
var/char2 = copytext(query_text, i + 1, i + 2)
if(char2 in multi[char])
query_list += "[char][char2]"
@@ -1101,13 +1100,13 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
word = "'"
for(i += length(char), i <= len, i += length(char))
char = query_text[i]
for(i++, i <= len, i++)
char = copytext(query_text, i, i + 1)
if(char == "'")
if(query_text[i + length(char)] == "'")
if(copytext(query_text, i + 1, i + 2) == "'")
word += "'"
i += length(query_text[i + length(char)])
i++
else
break
@@ -1129,13 +1128,13 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
word = "\""
for(i += length(char), i <= len, i += length(char))
char = query_text[i]
for(i++, i <= len, i++)
char = copytext(query_text, i, i + 1)
if(char == "\"")
if(query_text[i + length(char)] == "'")
if(copytext(query_text, i + 1, i + 2) == "'")
word += "\""
i += length(query_text[i + length(char)])
i++
else
break
@@ -256,7 +256,7 @@
node += "*"
i++
else if(token(i)[1] == "/")
else if (copytext(token(i), 1, 2) == "/")
i = object_type(i, node)
else
@@ -377,7 +377,7 @@
//object_type: <type path>
/datum/SDQL_parser/proc/object_type(i, list/node)
if(token(i)[1] != "/")
if (copytext(token(i), 1, 2) != "/")
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(token(i)[1] in list("'", "\""))
if(copytext(token(i), 1, 2) 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(token(i)[1] != "\[")
if(copytext(token(i), 1, 2) != "\[")
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))))//3 == length("0x") + 1
else if(lowertext(copytext(token(i), 1, 3)) == "0x" && isnum(hex2num(copytext(token(i), 3))))
node += hex2num(copytext(token(i), 3))
i++
@@ -621,12 +621,12 @@
node += text2num(token(i))
i++
else if(token(i)[1] in list("'", "\""))
else if(copytext(token(i), 1, 2) in list("'", "\""))
i = string(i, node)
else if(token(i)[1] == "\[") // Start a list.
else if(copytext(token(i), 1, 2) == "\[") // Start a list.
i = array(i, node)
else if(token(i)[1] == "/")
else if(copytext(token(i), 1, 2) == "/")
i = object_type(i, node)
else
i = variable(i, node)