mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-31 22:02:58 -06:00
.developing preprocesor
git-svn-id: svn://ultimatepp.org/upp/trunk@8155 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5018b1906a
commit
c635cd80d2
11 changed files with 176 additions and 43 deletions
|
|
@ -15,14 +15,18 @@ public:
|
|||
struct CppMacro : Moveable<CppMacro> {
|
||||
String body;
|
||||
Index<String> param;
|
||||
bool flag;
|
||||
bool variadic;
|
||||
bool flag; // used when expanding macros to mark those use; MT incompatible (!)
|
||||
|
||||
String Expand(const Vector<String>& p);
|
||||
|
||||
CppMacro() { flag = false; }
|
||||
String ToString() const;
|
||||
|
||||
CppMacro() { flag = variadic = false; }
|
||||
};
|
||||
|
||||
struct Cpp {
|
||||
bool incomment;
|
||||
VectorMap<String, CppMacro> macro;
|
||||
|
||||
void Define(const char *s);
|
||||
|
|
@ -31,6 +35,8 @@ struct Cpp {
|
|||
void ParamAdd(Vector<String>& param, const char *b, const char *e);
|
||||
|
||||
String Expand(const char *s);
|
||||
|
||||
String Preprocess(Stream& in, bool needresult = true);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue