Opened 12 years ago

#382 new defect

detection of comments fails when codons are inside quotes

Reported by: Peter Johansson Owned by: Jari Häkkinen
Priority: major Milestone: svndigest 0.x+
Component: core Version: trunk
Keywords: Cc:


For instance, see this code

cout << "abc /*"
     << "bla bla"
     << "and even more" << endl;
calling_some_func(x, y, z);
/* end of this example */

Here, only the first line will be considered code and the remaining lines are viewed as comments, since there is an opening '/*' that is not closed until the end (*/). However, the '/*' should be ignored because it is quoted.

Most file type probably use '"' or '"' to mark start and end of a quotation, but e.g. autoconf uses 'and?'.

Change History (0)

Note: See TracTickets for help on using tickets.