lambda-calc-1/parse/tokenizer/put_back.c
2025-01-13 20:36:07 -06:00

26 lines
398 B
C

#include <assert.h>
#include <debug.h>
#include "../token/inc.h"
#include "../token/free.h"
#include "struct.h"
#include "put_back.h"
void tokenizer_put_back(
struct tokenizer* this,
struct token* token)
{
ENTER;
assert(!this->put_back);
this->put_back = inc_token(this->token);
free_token(this->token), this->token = inc_token(token);
EXIT;
}