mirror of
https://github.com/tars-node/tars2node.git
synced 2024-03-22 13:10:56 +08:00
version: 20190510
This commit is contained in:
parent
a5b3fdf39d
commit
e5d3cc184d
|
@ -7,7 +7,7 @@ set(CMAKE_VERBOSE_MAKEFILE off)
|
||||||
# version
|
# version
|
||||||
set(TARS_VERSION "1.1.0")
|
set(TARS_VERSION "1.1.0")
|
||||||
set(PARSER_VERSION "${TARS_VERSION}")
|
set(PARSER_VERSION "${TARS_VERSION}")
|
||||||
set(GENERATOR_VERSION "20190509")
|
set(GENERATOR_VERSION "20190510")
|
||||||
|
|
||||||
# namespace
|
# namespace
|
||||||
set(IDL_NAMESPACE Tars)
|
set(IDL_NAMESPACE Tars)
|
||||||
|
|
BIN
build/tars2node
BIN
build/tars2node
Binary file not shown.
|
@ -180,10 +180,16 @@ string CodeGenerator::getDataType(const TypePtr& pPtr, const bool &bCastEnumAsAn
|
||||||
MapPtr mPtr = MapPtr::dynamicCast(pPtr);
|
MapPtr mPtr = MapPtr::dynamicCast(pPtr);
|
||||||
if (mPtr)
|
if (mPtr)
|
||||||
{
|
{
|
||||||
|
string sLeft = representArgument(mPtr->getLeftTypePtr());
|
||||||
|
string sRight = representArgument(mPtr->getRightTypePtr());
|
||||||
|
|
||||||
|
if (sLeft.empty() && !sRight.empty())
|
||||||
|
{
|
||||||
|
sLeft = ", 0";
|
||||||
|
}
|
||||||
|
|
||||||
return IDL_NAMESPACE_STR + "Stream.Map(" + getDataType(mPtr->getLeftTypePtr(), bCastEnumAsAny) + ", " +
|
return IDL_NAMESPACE_STR + "Stream.Map(" + getDataType(mPtr->getLeftTypePtr(), bCastEnumAsAny) + ", " +
|
||||||
getDataType(mPtr->getRightTypePtr(), bCastEnumAsAny) +
|
getDataType(mPtr->getRightTypePtr(), bCastEnumAsAny) + sLeft + sRight + ")";
|
||||||
representArgument(mPtr->getLeftTypePtr()) +
|
|
||||||
representArgument(mPtr->getRightTypePtr()) + ")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EnumPtr ePtr = EnumPtr::dynamicCast(pPtr);
|
EnumPtr ePtr = EnumPtr::dynamicCast(pPtr);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user