mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* tidy * Automated clang-tidy change: modernize-concat-nested-namespaces * compile test * fix namespace --------- Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
45 lines
669 B
C++
45 lines
669 B
C++
/** @file
|
|
*
|
|
* @par History
|
|
* - 2006/10/06 Shinigami: malloc.h -> stdlib.h
|
|
*/
|
|
|
|
#include "token.h"
|
|
|
|
#include <cstdio>
|
|
#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()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Erases all the content from the String (s), that becomes empty
|
|
*/
|
|
void Token::nulStr()
|
|
{
|
|
token.clear();
|
|
}
|
|
|
|
void Token::setStr( std::string str )
|
|
{
|
|
token = std::move( str );
|
|
}
|
|
|
|
} // namespace Pol::Bscript
|