#ifndef _cpp_cpp_h_ #define _cpp_cpp_h_ #include #include using namespace Upp; struct CppMacro : Moveable { String body; Index param; bool variadic; String Expand(const Vector& p) const; String ToString() const; CppMacro() { variadic = false; } }; struct CppMacroRecord { Time last_write; VectorMap macro; Index includes; CppMacroRecord() { last_write = Time::Low(); } }; const VectorMap *GetFileMacros(const String& filepath); struct Cpp { bool incomment; String filedir; String include_path; VectorMap used_macro; Index not_macro; Index header; VectorMap macro0; VectorMap macro; Index notmacro; Index usedmacro; void SyncSet(); Vector *> macro_set; String Define(const char *s); static const char *SkipString(const char *s); void ParamAdd(Vector& param, const char *b, const char *e); String Expand(const char *s); void Include(const char *s); String GetIncludePath(const char *s); String Do(Stream& in, Index& header); }; String Preprocess(const String& filename, const String& include_path); #endif