-
Notifications
You must be signed in to change notification settings - Fork 0
/
macro_table.h
54 lines (44 loc) · 846 Bytes
/
macro_table.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* Macro Table
* Provides interactions with macros.
*/
#include "common.h"
#include "utilities.h"
#ifndef MACRO_TABLE_H
#define MACRO_TABLE_H
typedef struct macro {
char *name;
char *content;
} macro;
typedef struct macro_node {
struct macro_node *next;
macro data;
} macro_node;
typedef macro_node* macro_list;
/**
* @brief add macro to macro table
*
* @param name of macro
* @param content of macro
*/
void add_macro(char *name, char *content);
/**
* @brief check if given macro exists.
*
* @param name of macro
* @return true if exists, false otherwise
*/
bool macro_exists(char *name);
/**
* @brief return the specified macro
*
* @param name of macro to return
* @return char* macro
*/
char* get_macro(char *name);
/**
* @brief free macros
*
*/
void clear_macros();
void print_macros();
#endif