mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 05:47:31 +02:00
Support macro text continuation after single line comment (issue #435)
This commit is contained in:
+5
-5
@@ -1082,15 +1082,15 @@ static void do_define(void)
|
|||||||
|
|
||||||
define_continue_flag = 0;
|
define_continue_flag = 0;
|
||||||
|
|
||||||
/* Look for comments in the definition, and remove them. The
|
/* Look for comments in the definition, and remove them. */
|
||||||
* "//" style comments go to the end of the line and terminate
|
|
||||||
* the definition, but the multi-line comments are simply cut
|
|
||||||
* out, and the define continues.
|
|
||||||
*/
|
|
||||||
cp = strchr(yytext, '/');
|
cp = strchr(yytext, '/');
|
||||||
|
|
||||||
while (cp && *cp) {
|
while (cp && *cp) {
|
||||||
if (cp[1] == '/') {
|
if (cp[1] == '/') {
|
||||||
|
if (cp[strlen(cp) - 1] == '\\') {
|
||||||
|
define_continue_flag = 1;
|
||||||
|
*cp++ = '\\';
|
||||||
|
}
|
||||||
*cp = 0;
|
*cp = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user