Commit f032bcbd by sikang

bug fix

parent 36bb9e41
......@@ -169,11 +169,13 @@ class JavaGarble:
if (line.startswith(" ") and not line.startswith(" ")) and ("){\n" in line or ") {\n" in line):
curly_braces = line.count("{")
curly_braces -= line.count("}")
if curly_braces > 0:
curly_braces += line.count("{")
curly_braces -= line.count("}")
# 一个花括号表示在方法的直接作用域内
if curly_braces == 1:
curly_braces += line.count("{")
curly_braces -= line.count("}")
if "return" in line:
curly_braces = -10000
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment