Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-05-07 13:19:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f5f29e486f7e1dbe59d79f3fad8adebfca473569
f5f29e48
1 parent
5e806d62
update code stat
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
trunk/research/code-statistic/cs.py
trunk/research/code-statistic/cs.py
查看文件 @
f5f29e4
...
...
@@ -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
)
...
...
请
注册
或
登录
后发表评论