-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patherror.c
More file actions
113 lines (97 loc) · 1.85 KB
/
Copy patherror.c
File metadata and controls
113 lines (97 loc) · 1.85 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include <stdio.h>
#include "error.h"
#ifdef _WIN64
#endif
#if defined __linux__ || defined __MACH__
#endif
void errHead ()
{
#ifdef _WIN64
printf ("ERPLAG : ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_CYAN "ERPLAG : " ANSI_RESET) ;
#endif
}
void errFatal ()
{
errHead () ;
#ifdef _WIN64
printf ("FATAL ERROR ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_RED "FATAL ERROR " ANSI_RESET) ;
#endif
errArrow () ;
}
void errLine (int line)
{
#ifdef _WIN64
printf ("%d", line) ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_CYAN "%d" ANSI_RESET, line) ;
#endif
}
void errLex ()
{
errHead () ;
#ifdef _WIN64
printf ("Lexical Error ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_RED "Lexical Error " ANSI_RESET) ;
#endif
}
void errParse ()
{
errHead () ;
#ifdef _WIN64
printf ("Parsing Error ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_MAGENTA "Parsing Error " ANSI_RESET) ;
#endif
}
void errSemantic ()
{
errHead () ;
#ifdef _WIN64
printf ("Semantic Error ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_YELLOW "Semantic Error " ANSI_RESET) ;
#endif
errArrow () ;
}
void errWarning ()
{
errHead () ;
#ifdef _WIN64
printf ("Warning ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_BLUE "Warning " ANSI_RESET) ;
#endif
errArrow () ;
}
void errCodegen ()
{
errHead () ;
#ifdef _WIN64
printf ("CODEGEN ERROR ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD ANSI_RED "CODEGEN ERROR " ANSI_RESET) ;
#endif
errArrow () ;
}
void errArrow ()
{
#ifdef _WIN64
printf ("--> ") ;
#endif
#if defined __linux__ || defined __MACH__
printf (ANSI_BOLD "--> " ANSI_RESET) ;
#endif
}