Better error handling in lexer
This commit is contained in:
21
src/Error.h
Normal file
21
src/Error.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef ERROR_H
|
||||
#define ERROR_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Error {
|
||||
private:
|
||||
int line;
|
||||
int column;
|
||||
string lexme;
|
||||
|
||||
public:
|
||||
Error(int line, int column, string lexme);
|
||||
int getLine();
|
||||
int getColumn();
|
||||
string getLexme();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user