def source = new File(args[0]).text def nesting = 0 def maxnest = 0 for (c in source) { switch (c) { case "{":nesting if (nesting''> > maxnest) maxnest break case "}":nesting break } } println(maxnest)
def source = new File(args[0]).text
def
source
= new File(args[0])
new File
File
args[0]
args
[0]
0
.
text
def nesting = 0
nesting
= 0
def maxnest = 0
maxnest
for (c in source)
(c
c
{ switch (c) { case "{":nesting if (nesting''> > maxnest) maxnest break case "}":nesting break }
switch (c
case "{":
"{"
nesting if (nesting''> > maxnest) maxnest break
if (nesting''> > maxnest)
''> >
break
case "}":
"}"
nesting break
println(maxnest)
println
(maxnest)