I need to check a file line by line for a missing brace. The line can contain multiple, nested braces using {}. Such as this...
#alias {botcast} #if {$botfail<$maxfail} {cast '$lastspell' $target;#var holderc
$botfail;#math {botfail} {$holderc+1}};#if {$botfail=$maxfail} {say I give up on casting '$lastspell' $target}}
No check needs to go past a line. Each line will pass or fail on its own. All I have to know is which lines do not have matches of {}
Ive spent all morning googling and every answer seems to be either too complicated or extensive in its checks. I really thought there would be a snippet to do this. Maybe something that checks for matched quotes or matched brackets which can be modified for this job. Before anyone brings up standard prettyfiers this is tintin code which might confuse some of the standard code-checkers.
Start Free Trial