git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@11911 626c5289-ae23-0410-ae9c-e8d60b6d4f22
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
/* -----------------------------------------------------------------------------
|
|
* This file is part of SWIG, which is licensed as a whole under version 3
|
|
* (or any later version) of the GNU General Public License. Some additional
|
|
* terms also apply to certain portions of SWIG. The full details of the SWIG
|
|
* license and copyrights can be found in the LICENSE and COPYRIGHT files
|
|
* included with the SWIG source code as distributed by the SWIG developers
|
|
* and at http://www.swig.org/legal.html.
|
|
*
|
|
* Token.cpp
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
#include "Token.h"
|
|
#include "DoxygenEntity.h"
|
|
using namespace std;
|
|
|
|
|
|
Token::Token(int tType, string tString) {
|
|
tokenType = tType;
|
|
tokenString = tString;
|
|
}
|
|
|
|
string Token::toString() {
|
|
if (tokenType == END_LINE) {
|
|
return "{END OF LINE}";
|
|
}
|
|
if (tokenType == PARAGRAPH_END) {
|
|
return "{END OF PARAGRAPH}";
|
|
}
|
|
if (tokenType == PLAINSTRING) {
|
|
return "{PLAINSTRING :" + tokenString + "}";
|
|
}
|
|
if (tokenType == COMMAND) {
|
|
return "{COMMAND : " + tokenString + "}";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
Token::~Token() {
|
|
}
|