got newlines working much better; Kipp still won't be happy, but the, he never is.
This commit is contained in:
@@ -24,14 +24,14 @@
|
||||
#include "nsIURL.h"
|
||||
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* Default constructor
|
||||
*
|
||||
* @update gess 3/25/98
|
||||
* @param aFilename -- name of file to be tokenized
|
||||
* @param aDelegate -- ref to delegate to be used to tokenize
|
||||
* @return
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
CTokenizer::CTokenizer(nsIURL* aURL,ITokenizerDelegate* aDelegate,eParseMode aMode) :
|
||||
mTokenDeque() {
|
||||
mDelegate=aDelegate;
|
||||
@@ -40,13 +40,13 @@ CTokenizer::CTokenizer(nsIURL* aURL,ITokenizerDelegate* aDelegate,eParseMode aMo
|
||||
}
|
||||
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* default destructor
|
||||
*
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
CTokenizer::~CTokenizer() {
|
||||
delete mScanner;
|
||||
delete mDelegate;
|
||||
@@ -64,20 +64,20 @@ nsDeque& CTokenizer::GetDeque(void) {
|
||||
return mTokenDeque;
|
||||
}
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* Cause the tokenizer to consume the next token, and
|
||||
* return an error result.
|
||||
*
|
||||
* @update gess 3/25/98
|
||||
* @param anError -- ref to error code
|
||||
* @return new token or null
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
CToken* CTokenizer::GetToken(PRInt32& anError) {
|
||||
CToken* nextToken=mDelegate->GetToken(*mScanner,anError);
|
||||
return nextToken;
|
||||
}
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* Retrieve the number of elements in the deque
|
||||
*
|
||||
* @update gess 3/25/98
|
||||
@@ -89,7 +89,7 @@ PRInt32 CTokenizer::GetSize(void) {
|
||||
}
|
||||
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* Part of the code sandwich, this gets called right before
|
||||
* the tokenization process begins. The main reason for
|
||||
* this call is to allow the delegate to do initialization.
|
||||
@@ -97,14 +97,14 @@ PRInt32 CTokenizer::GetSize(void) {
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return TRUE if it's ok to proceed
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
PRBool CTokenizer::WillTokenize(){
|
||||
PRBool result=PR_TRUE;
|
||||
result=mDelegate->WillTokenize();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* This is the primary control routine. It iteratively
|
||||
* consumes tokens until an error occurs or you run out
|
||||
* of data.
|
||||
@@ -112,7 +112,7 @@ PRBool CTokenizer::WillTokenize(){
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return error code
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
PRInt32 CTokenizer::Tokenize(void) {
|
||||
CToken* nextToken;
|
||||
PRInt32 result;
|
||||
@@ -135,7 +135,7 @@ PRInt32 CTokenizer::Tokenize(void) {
|
||||
}
|
||||
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* This is the tail-end of the code sandwich for the
|
||||
* tokenization process. It gets called once tokenziation
|
||||
* has completed.
|
||||
@@ -143,7 +143,7 @@ PRInt32 CTokenizer::Tokenize(void) {
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return TRUE if all went well
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
PRBool CTokenizer::DidTokenize() {
|
||||
PRBool result=mDelegate->DidTokenize();
|
||||
|
||||
@@ -154,7 +154,7 @@ PRBool CTokenizer::DidTokenize() {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* This debug routine is used to cause the tokenizer to
|
||||
* iterate its token list, asking each token to dump its
|
||||
* contents to the given output stream.
|
||||
@@ -162,7 +162,7 @@ PRBool CTokenizer::DidTokenize() {
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
void CTokenizer::DebugDumpTokens(ostream& out) {
|
||||
nsDequeIterator b=mTokenDeque.Begin();
|
||||
nsDequeIterator e=mTokenDeque.End();
|
||||
@@ -175,7 +175,7 @@ void CTokenizer::DebugDumpTokens(ostream& out) {
|
||||
}
|
||||
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
* This debug routine is used to cause the tokenizer to
|
||||
* iterate its token list, asking each token to dump its
|
||||
* contents to the given output stream.
|
||||
@@ -183,7 +183,7 @@ void CTokenizer::DebugDumpTokens(ostream& out) {
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
void CTokenizer::DebugDumpSource(ostream& out) {
|
||||
nsDequeIterator b=mTokenDeque.Begin();
|
||||
nsDequeIterator e=mTokenDeque.End();
|
||||
@@ -197,13 +197,13 @@ void CTokenizer::DebugDumpSource(ostream& out) {
|
||||
}
|
||||
|
||||
|
||||
/**-------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
* @return
|
||||
*------------------------------------------------------*/
|
||||
*/
|
||||
void CTokenizer::SelfTest(void) {
|
||||
#ifdef _DEBUG
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user