fixed nearly 20 parser bugs

git-svn-id: svn://10.0.0.236/trunk@18065 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-01-20 06:56:07 +00:00
parent 2749296524
commit 6f3675f1ff
12 changed files with 2234 additions and 976 deletions

View File

@@ -625,9 +625,12 @@ nsresult CCommentToken::Consume(PRUnichar aChar, nsScanner& aScanner) {
//in this case, we're reading a long-form comment <-- xxx -->
mTextValue+="-";
PRInt32 findpos=-1;
while((findpos==kNotFound) && (NS_OK==result)) {
result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_TRUE);
findpos=mTextValue.RFind("-->");
while((findpos<3) && (NS_OK==result)) {
result=aScanner.ReadUntil(mTextValue,kMinus,PR_TRUE);
findpos=mTextValue.RFind("--");
}
if(NS_OK==result) {
result=aScanner.ReadUntil(mTextValue,kGreaterThan,PR_TRUE); //now skip to '>'
}
return result;
}