More functional Makefile.
[Jack-Compiler.git] / error.h
1 #ifndef ERROR_H_
2 #define ERROR_H_
4 /*
5 * Prints error to stdout along with error number and string description of problem.
6 * Exits program without recourse.
7 */
8 void exit_error(const int err_num, const char *err_msg);
11 * Display Warnings about assembler status as needed.
13 * These are messages to the user that contain both an error number
14 * as well as simple description of what went wrong.
16 * Error number corresponds to number listed in documentation.
19 void warning_error(const int err_num, const char *err_msg);
22 * Compiler error informs user of poorly formated code.
23 * Prints line of code error occurs on and gives message about what went wrong.
25 * comp_num is unique number for compiler error.
26 * err_msg is unique text message for user.
27 * pS is pointer to beginning of source code.
28 * pC is pointer to beginning of token where error occurred.
29 * pT is current token array.
32 void compiler_error(const int comp_num, const char *err_msg, char *pS, char *pC, char pT[]);
35 * Prints line number that error/warning occurred for user.
37 void line_notification(const int line_num);
39 #endif