From f5f29e486f7e1dbe59d79f3fad8adebfca473569 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 7 May 2014 13:19:25 +0800 Subject: [PATCH] update code stat --- trunk/research/code-statistic/cs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trunk/research/code-statistic/cs.py b/trunk/research/code-statistic/cs.py index 912d089b3..a5a7a4928 100755 --- a/trunk/research/code-statistic/cs.py +++ b/trunk/research/code-statistic/cs.py @@ -51,12 +51,19 @@ def process(f, code_file): is_line_comments = False else: verbose("[block][cont] %s"%line) + stat_block_comments += 1 continue if line.startswith("/*"): verbose("[block][start] %s"%line) is_block_comments = True is_line_comments = False stat_block_comments += 1 + # inline block comments + if is_block_comments: + if "*/" in line: + verbose("[block][end] %s"%line) + is_block_comments = False + is_line_comments = False continue if line.startswith("//"): verbose("[line] %s"%line)