Skip to content

Commit 2f36d26

Browse files
committed
Implemented option(output_comment,output_test)
1 parent c1ce090 commit 2f36d26

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

expand.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def output_file(filename, output_comment, output_test):
1919
res.append('mod {}{{'.format(filename))
2020

2121
for line in f:
22+
if not output_test and line.strip()=='#[cfg(test)]':
23+
break
24+
if not output_comment and line.strip().startswith("//"):
25+
continue
2226
res.append(line.rstrip())
2327

2428
res.append('}')
@@ -31,7 +35,6 @@ def output_file(filename, output_comment, output_test):
3135
print(e)
3236
sys.exit(2)
3337

34-
# unimplemented
3538
output_comment = False
3639
output_test = False
3740

0 commit comments

Comments
 (0)