diff --git a/CMakeLists.txt b/CMakeLists.txt
index 826f83f..c6ddb44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ set(CMAKE_VERBOSE_MAKEFILE off)
# version
set(TARS_VERSION "1.1.0")
set(PARSER_VERSION "${TARS_VERSION}")
-set(GENERATOR_VERSION "20190516")
+set(GENERATOR_VERSION "20190529")
# namespace
set(IDL_NAMESPACE Tars)
diff --git a/build/tars2node b/build/tars2node
index be279f2..d77b620 100755
Binary files a/build/tars2node and b/build/tars2node differ
diff --git a/src/code_generator.cpp b/src/code_generator.cpp
index 9c0e6db..72e000e 100644
--- a/src/code_generator.cpp
+++ b/src/code_generator.cpp
@@ -30,16 +30,6 @@ string CodeGenerator::printHeaderRemark(const string &sTypeName)
return s.str();
}
-string CodeGenerator::printHeaderRemark(const string &sTypeName, const string &sSuffix)
-{
- ostringstream s;
- s << printHeaderRemark(sTypeName);
- s << sSuffix << endl;
- s << endl;
-
- return s.str();
-}
-
void CodeGenerator::createFile(const string &file, const bool bEntry)
{
_sIdlFile = getRealFileInfo(file);
diff --git a/src/code_generator.h b/src/code_generator.h
index c9c3b35..6add34b 100644
--- a/src/code_generator.h
+++ b/src/code_generator.h
@@ -283,8 +283,6 @@ private:
string printHeaderRemark(const string &sTypeName);
- string printHeaderRemark(const string &sTypeName, const string &sSuffix);
-
private:
string _sRpcPath;
diff --git a/src/gen_js.cpp b/src/gen_js.cpp
index b9b5de7..0076cc8 100644
--- a/src/gen_js.cpp
+++ b/src/gen_js.cpp
@@ -416,7 +416,9 @@ bool CodeGenerator::generateJS(const ContextPtr &pPtr)
// concat generated code
ostringstream sstr;
- sstr << printHeaderRemark("Structure", DISABLE_ESLINT);
+ sstr << printHeaderRemark("Structure");
+ sstr << DISABLE_ESLINT << endl;
+ sstr << endl;
sstr << "\"use strict\";" << endl << endl;
if (bNeedAssert)
{
diff --git a/src/gen_js_dts.cpp b/src/gen_js_dts.cpp
index b3ce118..8503862 100644
--- a/src/gen_js_dts.cpp
+++ b/src/gen_js_dts.cpp
@@ -229,7 +229,10 @@ void CodeGenerator::generateDTS(const ContextPtr &pPtr)
// concat generated code
ostringstream sstr;
- sstr << printHeaderRemark("Structure", DISABLE_TSLINT);
+ sstr << printHeaderRemark("Structure");
+ sstr << DISABLE_TSLINT << endl;
+ sstr << DISABLE_ESLINT << endl;
+ sstr << endl;
sstr << ostr.str() << endl;
sstr << estr.str() << endl;
diff --git a/src/gen_proxy.cpp b/src/gen_proxy.cpp
index 26b877c..c71cdeb 100644
--- a/src/gen_proxy.cpp
+++ b/src/gen_proxy.cpp
@@ -479,7 +479,9 @@ bool CodeGenerator::generateJSProxy(const ContextPtr &cPtr)
// concat generated code
ostringstream sstr;
- sstr << printHeaderRemark("Client", DISABLE_ESLINT);
+ sstr << printHeaderRemark("Client");
+ sstr << DISABLE_ESLINT << endl;
+ sstr << endl;
sstr << "\"use strict\";" << endl << endl;
if (bNeedAssert)
{
diff --git a/src/gen_proxy_dts.cpp b/src/gen_proxy_dts.cpp
index 9b54d22..d81af86 100644
--- a/src/gen_proxy_dts.cpp
+++ b/src/gen_proxy_dts.cpp
@@ -130,7 +130,10 @@ void CodeGenerator::generateDTSProxy(const ContextPtr &cPtr)
// concat generated code
ostringstream sstr;
- sstr << printHeaderRemark("Client", DISABLE_TSLINT);
+ sstr << printHeaderRemark("Client");
+ sstr << DISABLE_TSLINT << endl;
+ sstr << DISABLE_ESLINT << endl;
+ sstr << endl;
if (bNeedStream)
{
sstr << "import * as " << IDL_NAMESPACE_STR << "Stream from \"" << _sStreamPath << "\";" << endl;
diff --git a/src/gen_proxy_ts.cpp b/src/gen_proxy_ts.cpp
index 845d737..93eac1c 100644
--- a/src/gen_proxy_ts.cpp
+++ b/src/gen_proxy_ts.cpp
@@ -427,7 +427,10 @@ bool CodeGenerator::generateTSProxy(const ContextPtr &cPtr)
// generate module imports
ostringstream sstr;
- sstr << printHeaderRemark("Client", DISABLE_TSLINT);
+ sstr << printHeaderRemark("Client");
+ sstr << DISABLE_TSLINT << endl;
+ sstr << DISABLE_ESLINT << endl;
+ sstr << endl;
sstr << "/// " << endl;
if (bNeedAssert)
{
diff --git a/src/gen_server.cpp b/src/gen_server.cpp
index 10dc194..710caba 100644
--- a/src/gen_server.cpp
+++ b/src/gen_server.cpp
@@ -372,7 +372,9 @@ bool CodeGenerator::generateJSServer(const ContextPtr &pPtr)
ostringstream str;
- str << printHeaderRemark("Server", DISABLE_ESLINT);
+ str << printHeaderRemark("Server");
+ str << DISABLE_ESLINT << endl;
+ str << endl;
str << "\"use strict\";" << endl << endl;
str << ostr.str() << endl;
str << istr.str();
diff --git a/src/gen_server_dts.cpp b/src/gen_server_dts.cpp
index 16814df..e4b42cb 100644
--- a/src/gen_server_dts.cpp
+++ b/src/gen_server_dts.cpp
@@ -144,7 +144,10 @@ void CodeGenerator::generateDTSServer(const ContextPtr &pPtr)
}
ostringstream str;
- str << printHeaderRemark("Server", DISABLE_TSLINT);
+ str << printHeaderRemark("Server");
+ str << DISABLE_TSLINT << endl;
+ str << DISABLE_ESLINT << endl;
+ str << endl;
str << ostr.str() << endl;
str << estr.str() << endl;
diff --git a/src/gen_server_ts.cpp b/src/gen_server_ts.cpp
index e6a81f5..59edc4c 100644
--- a/src/gen_server_ts.cpp
+++ b/src/gen_server_ts.cpp
@@ -361,7 +361,10 @@ bool CodeGenerator::generateTSServer(const ContextPtr &pPtr)
ostringstream str;
// generate the source file
- str << printHeaderRemark("Server", DISABLE_TSLINT);
+ str << printHeaderRemark("Server");
+ str << DISABLE_TSLINT << endl;
+ str << DISABLE_ESLINT << endl;
+ str << endl;
str << "/// " << endl;
if (bNeedAssert)
{
diff --git a/src/gen_ts.cpp b/src/gen_ts.cpp
index 7cf9f3c..b2f09f3 100644
--- a/src/gen_ts.cpp
+++ b/src/gen_ts.cpp
@@ -431,7 +431,10 @@ void CodeGenerator::generateTS(const ContextPtr &pPtr)
// concat generated code
ostringstream sstr;
- sstr << printHeaderRemark("Structure", DISABLE_TSLINT);
+ sstr << printHeaderRemark("Structure");
+ sstr << DISABLE_TSLINT << endl;
+ sstr << DISABLE_ESLINT << endl;
+ sstr << endl;
sstr << "/// " << endl;
sstr << ostr.str() << endl;
sstr << estr.str() << endl;