doxygen: updated a few comments

This commit is contained in:
Daniel Marjamäki 2009-07-13 13:35:33 +02:00
parent 7491200d71
commit f7cb7da560
2 changed files with 21 additions and 9 deletions

View File

@ -17,14 +17,17 @@
*/
/** @mainpage
* Overview \n
* The source code is first tokenized and then checked. \n
* \n
* Writing checks \n
/**
*
* @mainpage Cppcheck
*
* @section overview_sec Overview
* The source code is first tokenized and then checked.
*
* @section writing_checks_sec Writing checks
* The checks are written in C++. Below is a simple example of a check
* that detect division with zero:
* \code
* @code
void CheckOther::checkZeroDivision()
{
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
@ -33,11 +36,11 @@ void CheckOther::checkZeroDivision()
reportError(tok, "error", "zerodiv", "Division by zero");
}
}
\endcode
@endcode
*
*/
#include "cppcheckexecutor.h"
/**

View File

@ -21,6 +21,16 @@
#include <string>
/**
* @brief The token list that the Tokenizer generates is a linked-list of this class.
*
* Tokens are stored as strings. The "if", "while", etc are stored in plain text.
* The reason the Token class is needed (instead of using the string class) is that some extra functionality is also needed for tokens:
* - location of the token is stored (linenr, fileIndex)
* - functions for classifying the token (isName, isNumber, isBoolean, isStandardType)
*
* The Token class also has other functions for management of token list, matching tokens, etc.
*/
class Token
{
public:
@ -126,7 +136,6 @@ public:
*/
static int multiCompare(const char *haystack, const char *needle);
unsigned int linenr() const;
void linenr(unsigned int linenr);