mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-06-01 06:14:11 +08:00
Update Release
This commit is contained in:
+16
-20
@@ -6852,34 +6852,30 @@ Workflow_GenerateInstanceClass
|
|||||||
{
|
{
|
||||||
if (auto type = parseType(state->typeName, L"state \"" + state->name.ToString() + L" of instance \"" + context->className + L"\""))
|
if (auto type = parseType(state->typeName, L"state \"" + state->name.ToString() + L" of instance \"" + context->className + L"\""))
|
||||||
{
|
{
|
||||||
|
auto decl = MakePtr<WfVariableDeclaration>();
|
||||||
|
addDecl(decl);
|
||||||
|
|
||||||
|
decl->name.value = state->name.ToString();
|
||||||
|
decl->type = type;
|
||||||
if (!beforePrecompile)
|
if (!beforePrecompile)
|
||||||
{
|
{
|
||||||
auto decl = MakePtr<WfVariableDeclaration>();
|
|
||||||
addDecl(decl);
|
|
||||||
|
|
||||||
decl->name.value = state->name.ToString();
|
|
||||||
decl->type = type;
|
|
||||||
decl->expression = getPropValue(state->name.ToString(), type, state->value);
|
decl->expression = getPropValue(state->name.ToString(), type, state->value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{
|
auto nullExpr = MakePtr<WfLiteralExpression>();
|
||||||
auto decl = MakePtr<WfFunctionDeclaration>();
|
nullExpr->value = WfLiteralValue::Null;
|
||||||
addDecl(decl);
|
|
||||||
|
|
||||||
decl->anonymity = WfFunctionAnonymity::Named;
|
auto castObject = MakePtr<WfInferExpression>();
|
||||||
decl->name.value = L"<get>" + state->name.ToString();
|
castObject->type = GetTypeFromTypeInfo(TypeInfoRetriver<Value>::CreateTypeInfo().Obj());
|
||||||
decl->returnType = CopyType(type);
|
castObject->expression = nullExpr;
|
||||||
decl->statement = notImplemented();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto decl = MakePtr<WfPropertyDeclaration>();
|
|
||||||
addDecl(decl);
|
|
||||||
|
|
||||||
decl->name.value = state->name.ToString();
|
auto castType = MakePtr<WfTypeCastingExpression>();
|
||||||
decl->type = type;
|
castType->strategy = WfTypeCastingStrategy::Strong;
|
||||||
decl->getter.value = L"<get>" + state->name.ToString();
|
castType->type = CopyType(type);
|
||||||
}
|
castType->expression = castObject;
|
||||||
|
|
||||||
|
decl->expression = castType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2362,6 +2362,7 @@ PartialClass
|
|||||||
arguments[1] = Value::From(resolver.Obj());
|
arguments[1] = Value::From(resolver.Obj());
|
||||||
initialize->Invoke(ctorInstance, arguments);
|
initialize->Invoke(ctorInstance, arguments);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user