Newlines in multi-line comments don't count as a newline.

TRAC #15791 Issue=114 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@569 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 3d8115ff
...@@ -558,11 +558,9 @@ static int byte_scan(InputSrc *in, yystypepp * yylvalpp) ...@@ -558,11 +558,9 @@ static int byte_scan(InputSrc *in, yystypepp * yylvalpp)
return -1; return -1;
return '\n'; return '\n';
} else if (ch == '*') { } else if (ch == '*') {
int nlcount = 0;
ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp);
do { do {
while (ch != '*') { while (ch != '*') {
if (ch == '\n') nlcount++;
if (ch == EOF) { if (ch == EOF) {
CPPErrorToInfoLog("EOF IN COMMENT"); CPPErrorToInfoLog("EOF IN COMMENT");
return -1; return -1;
...@@ -575,9 +573,6 @@ static int byte_scan(InputSrc *in, yystypepp * yylvalpp) ...@@ -575,9 +573,6 @@ static int byte_scan(InputSrc *in, yystypepp * yylvalpp)
return -1; return -1;
} }
} while (ch != '/'); } while (ch != '/');
if (nlcount) {
return '\n';
}
// Go try it again... // Go try it again...
} else if (ch == '=') { } else if (ch == '=') {
return CPP_DIV_ASSIGN; return CPP_DIV_ASSIGN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment