diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll index 9c9bc66f79bc73b4f9df8d7d439ceb13a1dfa29c..759b7d3a65a8a226076347227dfb363257a7fd46 100644 --- a/preprocessor/macro/MacroFlex.ll +++ b/preprocessor/macro/MacroFlex.ll @@ -300,6 +300,16 @@ CONT \\\\ then_body_tmp.append(yytext); yylloc->step(); } +<THEN_BODY>^{SPC}*@#{SPC}*ifdef({SPC}|{CONT}) { + nested_if_nb++; + then_body_tmp.append(yytext); + yylloc->step(); + } +<THEN_BODY>^{SPC}*@#{SPC}*ifndef({SPC}|{CONT}) { + nested_if_nb++; + then_body_tmp.append(yytext); + yylloc->step(); + } <THEN_BODY>. { then_body_tmp.append(yytext); yylloc->step(); } <THEN_BODY><<EOF>> { driver.error(if_stmt_loc_tmp, "@#if/@#ifdef/@#ifndef not matched by an @#endif or file does not end with a new line (unexpected end of file)"); } <THEN_BODY>^{SPC}*@#{SPC}*else{SPC}*(\/\/.*)?{EOL} {