Disallow non-language characters in comments for ES version 100.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24301 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
1abc4045ce
commit
4e734dd68b
10 changed files with 103 additions and 12 deletions
|
|
@ -647,7 +647,8 @@ int TPpContext::sourceScan(TPpContext* pp, InputSrc*, TPpToken* ppToken)
|
|||
else
|
||||
ch = nextch;
|
||||
}
|
||||
}
|
||||
} else if (ch > 0 && ! pp->languageCharacters[ch])
|
||||
pp->parseContext.commentCharacterCheck(ppToken->loc, ch);
|
||||
} while (ch != '\n' && ch != EOF);
|
||||
if (ch == EOF)
|
||||
return EOF;
|
||||
|
|
@ -659,11 +660,12 @@ int TPpContext::sourceScan(TPpContext* pp, InputSrc*, TPpToken* ppToken)
|
|||
while (ch != '*') {
|
||||
if (ch == '\n')
|
||||
nlcount++;
|
||||
if (ch == EOF) {
|
||||
else if (ch == EOF) {
|
||||
pp->parseContext.error(ppToken->loc, "EOF in comment", "comment", "");
|
||||
|
||||
return EOF;
|
||||
}
|
||||
} else if (! pp->languageCharacters[ch])
|
||||
pp->parseContext.commentCharacterCheck(ppToken->loc, ch);
|
||||
ch = pp->currentInput->getch(pp, pp->currentInput, ppToken);
|
||||
}
|
||||
ch = pp->currentInput->getch(pp, pp->currentInput, ppToken);
|
||||
|
|
@ -671,7 +673,8 @@ int TPpContext::sourceScan(TPpContext* pp, InputSrc*, TPpToken* ppToken)
|
|||
pp->parseContext.error(ppToken->loc, "EOF in comment", "comment", "");
|
||||
|
||||
return EOF;
|
||||
}
|
||||
} else if (! pp->languageCharacters[ch])
|
||||
pp->parseContext.commentCharacterCheck(ppToken->loc, ch);
|
||||
} while (ch != '/');
|
||||
if (nlcount)
|
||||
return '\n';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue