Puma Reference Manual | Puma: Puma::CT_Token Class Reference |
Tree node representing a single token in the source code. More...
#include <Puma/CTree.h>
Public Member Functions | |
CT_Token (Token *token, unsigned long int number=0) | |
Constructor. | |
const char * | NodeName () const |
Get the name of the node. | |
int | Sons () const |
Get the number of sons. | |
Token * | token () const |
Get the represented token. | |
Token * | end_token () const |
Get the represented token. | |
CT_Token * | token_node () const |
Get this. | |
CT_Token * | end_token_node () const |
Get this. | |
void | Number (unsigned long int number) |
Set the token number. | |
unsigned long int | Number () const |
Get the token number. | |
void * | operator new (size_t) |
Own new operator reusing memory. | |
void | operator delete (void *) |
Own delete operator. | |
Static Public Member Functions | |
static const char * | NodeId () |
Get the identifier for this node type. |
Tree node representing a single token in the source code.
Puma::CT_Token::CT_Token | ( | Token * | token, |
unsigned long int | number = 0 |
||
) | [inline] |
Constructor.
token | The represented token. |
number | The token number (a consecutive number). |
Token* Puma::CT_Token::end_token | ( | ) | const [inline, virtual] |
Get the represented token.
Reimplemented from Puma::CTree.
CT_Token* Puma::CT_Token::end_token_node | ( | ) | const [inline, virtual] |
Get this.
Reimplemented from Puma::CTree.
static const char* Puma::CT_Token::NodeId | ( | ) | [static] |
Get the identifier for this node type.
Can be compared with NodeName().
const char* Puma::CT_Token::NodeName | ( | ) | const [inline, virtual] |
unsigned long int Puma::CT_Token::Number | ( | ) | const [inline] |
Get the token number.
Can be used to indentify this token.
void Puma::CT_Token::Number | ( | unsigned long int | number | ) | [inline] |
Set the token number.
number | The token number. |
void Puma::CT_Token::operator delete | ( | void * | ) |
Own delete operator.
void* Puma::CT_Token::operator new | ( | size_t | ) |
Own new operator reusing memory.
int Puma::CT_Token::Sons | ( | ) | const [inline, virtual] |
Get the number of sons.
Implements Puma::CTree.
Token* Puma::CT_Token::token | ( | ) | const [inline, virtual] |
Get the represented token.
Reimplemented from Puma::CTree.
CT_Token* Puma::CT_Token::token_node | ( | ) | const [inline, virtual] |
Get this.
Reimplemented from Puma::CTree.