31 lines
412 B
C
31 lines
412 B
C
|
|
#include <stdlib.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include <string/free.h>
|
|
|
|
#include "../position/free.h"
|
|
|
|
#include "struct.h"
|
|
#include "free.h"
|
|
|
|
void free_token(
|
|
struct token* this)
|
|
{
|
|
ENTER;
|
|
|
|
if (this && !--this->refcount)
|
|
{
|
|
free_position(this->start);
|
|
|
|
free_position(this->end);
|
|
|
|
free_string(this->text);
|
|
|
|
free(this);
|
|
}
|
|
|
|
EXIT;
|
|
}
|
|
|