C
Christopher
Hello all,
I've got a question of comment logic. I'm trying to determine if a
given line of C/C++/C#/Java is a comment or not. Can you please
comment on my logic.
I need to define some terms first:
starts with = has only white space on the line untill it reaches ...
first preceeding valid /* = looking back, the first /* from the current
point in the file where the line does not have a // before the /*
a line is a pure comment line if:
the line starts with //
or
the line starts wih /*
or
the first preceeding valid /* occurs after the first preceeding */
I've got a question of comment logic. I'm trying to determine if a
given line of C/C++/C#/Java is a comment or not. Can you please
comment on my logic.
I need to define some terms first:
starts with = has only white space on the line untill it reaches ...
first preceeding valid /* = looking back, the first /* from the current
point in the file where the line does not have a // before the /*
a line is a pure comment line if:
the line starts with //
or
the line starts wih /*
or
the first preceeding valid /* occurs after the first preceeding */