version: 20190529

This commit is contained in:
superzheng 2019-05-29 14:35:10 +08:00
parent 24c9b8c988
commit 06e007481f
13 changed files with 34 additions and 22 deletions

View File

@ -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)

Binary file not shown.

View File

@ -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);

View File

@ -283,8 +283,6 @@ private:
string printHeaderRemark(const string &sTypeName);
string printHeaderRemark(const string &sTypeName, const string &sSuffix);
private:
string _sRpcPath;

View File

@ -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)
{

View File

@ -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;

View File

@ -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)
{

View File

@ -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;

View File

@ -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 << "/// <reference types=\"node\" />" << endl;
if (bNeedAssert)
{

View File

@ -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();

View File

@ -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;

View File

@ -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 << "/// <reference types=\"node\" />" << endl;
if (bNeedAssert)
{

View File

@ -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 << "/// <reference types=\"node\" />" << endl;
sstr << ostr.str() << endl;
sstr << estr.str() << endl;