diff --git a/uppdev/cpp/cpp.cpp b/uppdev/cpp/cpp.cpp index 5a7b01c81..58b08ace0 100644 --- a/uppdev/cpp/cpp.cpp +++ b/uppdev/cpp/cpp.cpp @@ -250,6 +250,17 @@ void Cpp::DoCpp(Stream& in, Index& header) Do(in, header); } +void Cpp::Parse() +{ + DDUMP(result.GetCount()); + String r = result; + _DBG_ SaveFile("c:/xxx/cpp/" + GetFileTitle(path) + ".hpp", r); + DDUMP(result.GetCount()); + StringStream ss(r); + DDUMP(result.GetCount()); + Parse(ss, Vector(), base, path, THISBACK(AddError)); +} + void Cpp::Do(Stream& in, Index& header) { incomment = false; @@ -281,6 +292,7 @@ void Cpp::Do(Stream& in, Index& header) String include = String().Cat() << path << ':' << lineno << ':' << header_path; if(path.GetCount() && header.Find(include) < 0) { DLOG(">>> " << l << " -> " << header_path << LOG_BEGIN); + Parse(result); header.Add(include); Cpp cpp; cpp.WhenError = Proxy(WhenError); @@ -314,13 +326,7 @@ void Cpp::Do(Stream& in, Index& header) while(el--) result.Cat("\n"); } - DDUMP(result.GetCount()); - String r = result; - _DBG_ SaveFile("c:/xxx/cpp/" + GetFileTitle(path) + ".hpp", r); - DDUMP(result.GetCount()); - StringStream ss(r); - DDUMP(result.GetCount()); - Parse(ss, Vector(), base, path, THISBACK(AddError)); + Parse(result); } String Cpp::GetIncludePath(const char *s) diff --git a/uppdev/cpp/cpp.h b/uppdev/cpp/cpp.h index baf3f461a..7fb844a86 100644 --- a/uppdev/cpp/cpp.h +++ b/uppdev/cpp/cpp.h @@ -48,6 +48,8 @@ struct Cpp { void Include(const char *s); String GetIncludePath(const char *s); + void Parse(); + void Do(Stream& in, Index& header); void DoCpp(Stream& in, Index& header); diff --git a/uppdev/cpp/main.cpp b/uppdev/cpp/main.cpp index 9e1f6890a..2d0b89667 100644 --- a/uppdev/cpp/main.cpp +++ b/uppdev/cpp/main.cpp @@ -9,6 +9,7 @@ void AddError(const String& path, int ln, const String& s) void Test(const char *path) { + DDUMP(sizeof(CppItem)); Cpp cpp; cpp.WhenError = callback(AddError); cpp.path = path; @@ -45,7 +46,9 @@ void Test(const char *path) CONSOLE_APP_MAIN { StdLogSetup(LOG_FILE, NULL, 150000000); - Test("c:/u/upp.src/uppsrc/Core/Cpu.cpp"); +// Test(GetDataFile("testfile")); + Test("c:/u/upp.src/uppsrc/CtrlLib/EditField.cpp"); + getchar(); return; }