-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.h
69 lines (63 loc) · 1.42 KB
/
debug.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @file debug.h
* @author Jakub Všetečka <xvsete00@vutbr.cz>
* @brief Debugging macros.
* @version 0.1
* @date 2023-11-24
*
* @copyright Copyright (c) 2023
* Project: IFJ compiler
*
*/
#ifndef DEBUG_H
#define DEBUG_H
//! DEBUG
#if DEBUG_PSA
#define DEBUG_PSA_CODE(code) \
do \
{ \
code \
} while (0)
#else
#define DEBUG_PSA_CODE(code) \
do \
{ \
} while (0)
#endif
#if DEBUG_SYNTAX
#define DEBUG_SYNTAX_CODE(code) \
do \
{ \
code \
} while (0)
#else
#define DEBUG_SYNTAX_CODE(code) \
do \
{ \
} while (0)
#endif
#if DEBUG_SEMANTIC
#define DEBUG_SEMANTIC_CODE(code) \
do \
{ \
code \
} while (0)
#else
#define DEBUG_SEMANTIC_CODE(code) \
do \
{ \
} while (0)
#endif
#if DEBUG_LEXER
#define DEBUG_LEXER_CODE(code) \
do \
{ \
code \
} while (0)
#else
#define DEBUG_LEXER_CODE(code) \
do \
{ \
} while (0)
#endif
#endif // DEBUG_H