A wad of changes to the parser. See my update

git-svn-id: svn://10.0.0.236/trunk@17433 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-01-09 01:09:02 +00:00
parent d67d163fe3
commit c8fc6237d4
92 changed files with 7354 additions and 8666 deletions

View File

@@ -21,6 +21,7 @@
#include "string.h"
#include "nsHTMLTokens.h"
#include "nshtmlpars.h"
#include "nsITokenizer.h"
const nsAutoString nsCParserNode::mEmptyString("");
@@ -35,24 +36,34 @@ static NS_DEFINE_IID(kIParserNodeIID, NS_IPARSER_NODE_IID);
* @param aToken -- token to init internal token
* @return
*/
nsCParserNode::nsCParserNode(CToken* aToken,PRInt32 aLineNumber): nsIParserNode() {
nsCParserNode::nsCParserNode(CToken* aToken,PRInt32 aLineNumber,nsITokenRecycler* aRecycler): nsIParserNode() {
NS_INIT_REFCNT();
mAttributeCount=0;
mLineNumber=aLineNumber;
mToken=aToken;
memset(mAttributes,0,sizeof(mAttributes));
mSkippedContent=nsnull;
mSkippedContent=0;
mRecycler=aRecycler;
}
/**
* default destructor
*
* NOTE: We intentionally DONT recycle mToken here.
* It may get cached for use elsewhere
* @update gess 3/25/98
* @param
* @return
*/
nsCParserNode::~nsCParserNode() {
if(mRecycler) {
int index=0;
for(index=0;index<mAttributeCount;index++){
mRecycler->RecycleToken(mAttributes[index]);
}
if(mSkippedContent)
mRecycler->RecycleToken(mSkippedContent);
}
}
NS_IMPL_ADDREF(nsCParserNode)