diff --git a/src/include/wxss.h b/src/include/wxss.h index 2bfe99e..56ed95f 100644 --- a/src/include/wxss.h +++ b/src/include/wxss.h @@ -162,10 +162,10 @@ namespace WXSS ~XCompiler(); void DealRPX(std::string &, std::stringstream &); void GetHostRule(std::string &); - void ShowTree(std::string &); - void GetCompiled(std::string const&, std::string&); + int ShowTree(std::string &); + int GetCompiled(std::string const&, std::string&); void GetJSCompiled(std::string const&, std::string&); - void GetWellFormattedJSCompiled(std::string const&, std::string&); + int GetWellFormattedJSCompiled(std::string const&, std::string&); void GenExpr(std::shared_ptr, std::stringstream &, std::string &); int GetPageCss(std::string const&, std::string&, uint); void MarkImported(std::string const&); diff --git a/src/wxss/common.cpp b/src/wxss/common.cpp index c4ba1c6..d038077 100644 --- a/src/wxss/common.cpp +++ b/src/wxss/common.cpp @@ -23,9 +23,37 @@ namespace WXSS } return a1; } - int LintAndParseCSSList(std::map const&, std::string&, std::string&, std::string&, int, bool, bool, bool, std::string const&) + int LintAndParseCSSList( + std::map const& a1, + std::string& a2, + std::string& a3, + std::string& a4, + int a5, + bool a6, + bool a7, + bool a8, + std::string const& a9) { - throw "not implement"; + WXSS::XCompiler v12(a1, a7, a9); + a4.assign(v12.offset_8); + int ret = v12.offset_0; + if (!v12.offset_0) + { + a3 = "/*v0.4me_20190328_db*/\n"; + if (a8) + { + ret = v12.ShowTree(a3); + } + else if(a6) + { + ret = v12.GetWellFormattedJSCompiled(a2, a3); + } + else + { + ret = v12.GetCompiled(a2, a3); + } + } + return ret; } int NewLintAndParseCSSList(std::map const&, std::vector &, std::string&, std::string&, int, bool, std::string const&, std::string const&) { diff --git a/src/wxss/x_compiler.cpp b/src/wxss/x_compiler.cpp index e55039b..420b053 100644 --- a/src/wxss/x_compiler.cpp +++ b/src/wxss/x_compiler.cpp @@ -148,11 +148,11 @@ namespace WXSS { throw "not implement"; } - void XCompiler::ShowTree(std::string &) + int XCompiler::ShowTree(std::string &) { throw "not implement"; } - void XCompiler::GetCompiled(std::string const&, std::string&) + int XCompiler::GetCompiled(std::string const&, std::string&) { throw "not implement"; } @@ -160,7 +160,7 @@ namespace WXSS { throw "not implement"; } - void XCompiler::GetWellFormattedJSCompiled(std::string const&, std::string&) + int XCompiler::GetWellFormattedJSCompiled(std::string const&, std::string&) { throw "not implement"; }