Commit 7a99178e by sikang

bug fix

parent 74c6ada4
......@@ -158,17 +158,17 @@ class JavaGarble:
#插入方法
for fun in self.__functions:
line +="%s\n"% fun
curly_braces += line.count("{")
curly_braces -= line.count("}")
#定位1个缩进开头的类方法
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 == 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