Message-Id: <
200111282147.fASLlxD04163@crypt.compulink.co.uk>
p4raw-id: //depot/perl@13355
??= define SOMETHING_ELSE_TRIGRAPHIC_8 "??>" /* | ??>| }| */
??=endif
+// test C++-style comment
+
+#if 1
+typdef struct empty_struct {
+} // trailing C++-style comment should not force continuation
+#endif
+
/* comments (that look like string) inside enums... */
enum {
eval 'sub SOMETHING_ELSE_TRIGRAPHIC_7 () {"#";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_7);
eval 'sub SOMETHING_ELSE_TRIGRAPHIC_8 () {"}";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_8);
}
+ if(1) {
+ }
eval("sub flim () { 0; }") unless defined(&flim);
eval("sub flam () { 1; }") unless defined(&flam);
}
} elsif ($in =~ s/^("(\\.|[^"\\])*")//) { # "...
$out .= $1;
} elsif ($in =~ s/^\/\/.*//) { # //...
- next READ;
+ # fall through
} elsif ($in =~ m/^\/\*/) { # /*...
# C comment removal adapted from perlfaq6:
if ($in =~ s/^\/\*[^*]*\*+([^\/*][^*]*\*+)*\///) {
}
}
- last READ;
+ last READ if $out =~ /\S/;
}
return $out;