-
Notifications
You must be signed in to change notification settings - Fork 0
/
VFileLineXs.h
32 lines (29 loc) · 963 Bytes
/
VFileLineXs.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
/*
* VFileLineXs.h
*
* Created on: 30.04.2012
* Author: jseyler
*/
#ifndef VFILELINEXS_H_
#define VFILELINEXS_H_
#include "VFileLine.h"
#include "My_PreProc.h"
class VFileLineXs : public VFileLine {
My_PreProc* m_vPreprocp; // Parser handling the errors
public:
VFileLineXs(My_PreProc* pp) : VFileLine(true), m_vPreprocp(pp) { if (pp) pushFl(); }
virtual ~VFileLineXs() { }
virtual VFileLine* create(const string& filename, int lineno) {
VFileLineXs* filelp = new VFileLineXs(m_vPreprocp);
filelp->init(filename, lineno);
return filelp;
}
virtual void error(const string& msg); // Report a error at given location
void setPreproc(My_PreProc* pp) {
m_vPreprocp=pp;
pushFl(); // The very first construction used pp=NULL, as pp wasn't created yet so make it now
}
// Record the structure so we can delete it later
void pushFl() { m_vPreprocp->m_filelineps.push_back(this); }
};
#endif /* VFILELINEXS_H_ */