Skip to content

Commit 9082c75

Browse files
committed
test.cpp: do not unconditionally remove comments
1 parent 538c5c4 commit 9082c75

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ static std::string preprocess(const char code[], const simplecpp::DUI &dui, simp
102102
std::vector<std::string> files;
103103
simplecpp::FileDataCache cache;
104104
simplecpp::TokenList tokens = makeTokenList(code,files);
105-
tokens.removeComments();
105+
if (dui.removeComments)
106+
tokens.removeComments();
106107
simplecpp::TokenList tokens2(files);
107108
simplecpp::preprocess(tokens2, tokens, files, cache, dui, outputList);
108109
simplecpp::cleanup(cache);

0 commit comments

Comments
 (0)