1/*
2 * Copyright © 2016 Sören Tempel
3 *
4 * This program is free software: you can redistribute it and/or
5 * modify it under the terms of the GNU Affero General Public
6 * License as published by the Free Software Foundation, either
7 * version 3 of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Affero General Public License for more details.
13 *
14 * You should have received a copy of the GNU Affero General Public
15 * License along with this program. If not, see
16 * <http://www.gnu.org/licenses/>.
17 */
18
19#include <assert.h>
20#include <stdlib.h>
21
22#include "token.h"
23
24/**
25 * Frees memory allocated for the given token.
26 *
27 * @pre The given token should not be NULL.
28 * @param tok Token for which allocated memory should be freed.
29 */
30void
31freetoken(token *tok)
32{
33 assert(tok);
34
35 free(tok);
36}