fixed handling of /******/ comments, added tests for backslash handling, which fail
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13733 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2f77dbc7f4
commit
8d61aae0fb
5 changed files with 106 additions and 18 deletions
|
|
@ -349,11 +349,14 @@ static int yylook(void) {
|
|||
return DOXYGENPOSTSTRING;
|
||||
}
|
||||
if (strncmp(loc, "/**", 3) == 0 || strncmp(loc, "///", 3) == 0||strncmp(loc, "/*!", 3) == 0||strncmp(loc, "//!", 3) == 0) {
|
||||
/* printf("Doxygen Comment: %s lines %d-%d [%s]\n", Char(Scanner_file(scan)), Scanner_start_line(scan), Scanner_line(scan), loc); */
|
||||
yylval.str = NewString(loc);
|
||||
Setline(yylval.str, Scanner_start_line(scan));
|
||||
Setfile(yylval.str, Scanner_file(scan));
|
||||
return DOXYGENSTRING;
|
||||
/* printf("Doxygen Comment: %s lines %d-%d [%s]\n", Char(Scanner_file(scan)), Scanner_start_line(scan), Scanner_line(scan), loc); */
|
||||
/* ignore comments like / * * * and / * * /, which are also ignored by Doxygen */
|
||||
if (loc[3] != '*' && loc[3] != '/') {
|
||||
yylval.str = NewString(loc);
|
||||
Setline(yylval.str, Scanner_start_line(scan));
|
||||
Setfile(yylval.str, Scanner_file(scan));
|
||||
return DOXYGENSTRING;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue