Commit ec083cdc by sikang

update

parent 547d0803
......@@ -49,7 +49,10 @@ def get_rand_code(isInFunc):
return code
def get_brackets(line):
left = line.count("{")
right = line.count("}")
return left - right
def process_file_content(path, file_name):
# print("processing content: %s..." % path)
......@@ -88,16 +91,15 @@ def process_file_content(path, file_name):
if " class " in line and "{" in line:
func_level=0
if "//interference code" not in line and \
("){\n" in line or ") {\n" in line) and \
if ("){\n" in line or ") {\n" in line) and \
func_level == 0 and \
not isReturn:
func_level = 1
elif func_level > 0:
if "//interference code" not in line and "{\n" in line:
func_level +=1
if "//interference code" not in line and "}\n" in line:
func_level -=1
func_level = get_brackets(line)
elif func_level != 0:
func_level +=get_brackets(line)
if func_level < 0 :
func_level = 0
#需要忽略的行
......
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