fixed several linter warnings (#26977)

This commit is contained in:
DamianX
2020-06-30 21:13:50 +02:00
committed by GitHub
parent 6c2410e4db
commit b5f52ccb4b
11 changed files with 15 additions and 29 deletions

View File

@@ -209,7 +209,7 @@
var/datum/stack/val = new
src.expecting = VALUE
var/loop = 0
for()
while(TRUE)
loop++
if(loop > 800)
errors += new/datum/scriptError("Too many nested tokens.")
@@ -327,7 +327,7 @@
NextToken() //skip open parenthesis, already found
var/loops = 0
for()
while(TRUE)
loops++
if(loops >= 800)
errors += new/datum/scriptError("Too many nested expressions.")
@@ -368,4 +368,4 @@
*/
/datum/n_Parser/nS_Parser/proc/ParseParamExpression(var/check_functions = 0)
var/cf = check_functions
return ParseExpression(list(",", ")"), check_functions = cf)
return ParseExpression(list(",", ")"), check_functions = cf)

View File

@@ -174,7 +174,7 @@ var/const/Represents a special statement in the code triggered by a keyword.
if(!parser.CheckToken("(", /datum/token/symbol))
return KW_FAIL
for() //for now parameters can be separated by whitespace - they don't need a comma in between
while(TRUE) //for now parameters can be separated by whitespace - they don't need a comma in between
if(istype(parser.curToken, /datum/token/symbol))
switch(parser.curToken.value)
if(",")

View File

@@ -185,7 +185,7 @@
if(!CheckToken("(", /datum/token/symbol)) //Check for and skip open parenthesis
return
var/loops = 0
for()
while(TRUE)
loops++
if(loops >= 800)
errors +=new/datum/scriptError("Cannot find ending params.")