Handle /* comment */ with // inside it

This commit is contained in:
Jamie Cameron
2012-03-31 12:10:56 -07:00
parent 97b08afe70
commit 8114f9da2b

View File

@ -92,8 +92,8 @@ while($line = <FILE>) {
# strip comments
$line =~ s/\r|\n//g;
$line =~ s/#.*$//g;
$line =~ s/\/\/.*$//g if ($line !~ /".*\/\/.*"/);
$line =~ s/\/\*.*\*\///g;
$line =~ s/\/\/.*$//g if ($line !~ /".*\/\/.*"/);
while(1) {
if (!$cmode && $line =~ /\/\*/) {
# start of a C-style comment