polserver/pol-core/bscript/token.cpp

47 lines
689 B
C++
Raw Permalink Normal View History

/** @file
*
* @par History
* - 2006/10/06 Shinigami: malloc.h -> stdlib.h
*/
2016-02-11 22:54:43 +01:00
#include "bscript/token.h"
2016-02-11 22:54:43 +01:00
#include "bscript/modules.h"
2016-02-11 22:54:43 +01:00
#include <cstring>
namespace Pol::Bscript
{
/**
* Initializes an empty token
*/
Token::Token()
: id( TOK_TERM ),
type( TYP_TERMINATOR ),
dval( 0.0 ),
precedence( -1 ),
dbg_filenum( 0 ),
dbg_linenum( 0 ),
lval( 0 ),
deprecated( false ),
module( Mod_Basic ),
token()
{
}
2016-02-11 22:54:43 +01:00
/**
* Erases all the content from the String (s), that becomes empty
*/
void Token::nulStr()
{
token.clear();
}
2016-02-11 22:54:43 +01:00
void Token::setStr( std::string str )
{
token = std::move( str );
}
2016-02-11 22:54:43 +01:00
} // namespace Pol::Bscript