#include "GuiInstanceLoader_WorkflowCodegen.h"
#include "../../Resources/GuiParserManager.h"
namespace
{
namespace
{
using
namespace
stream
;
using
namespace
reflection
::
description
;
using
namespace
workflow
;
using
namespace
workflow
::
analyzer
;
template
<
typename
>
<
>
(
GuiResourcePrecompileContext
&
,
const
&
,
,
const
&
,
,
collections
::
<
>&
,
parsing
::
)
{
=
.
();
auto
=
()->
<
>(
);
auto
=
parser
(
,
,
,
);
if
(
.
!=
0
||
.
!=
0
)
{
for
(
=
errorCount
;
i
<
.
();
i
++)
{
auto
&
=
i
];
if
(
error
.
.
>
.
)
{
error
.
.
-=
.
;
}
else
if
(
error
.
.
==
.
&&
error
.
.
>=
.
)
{
error
.
.
-=
.
;
}
}
}
if
(
result
)
{
Workflow_RecordScriptPosition
(
,
,
result
,
);
}
return
result
;
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
,
const
&
,
,
collections
::
<
>&
,
parsing
::
)
{
return
<
>(
,
L"WORKFLOW-TYPE"
,
,
,
,
,
);
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
,
const
&
,
,
collections
::
<
>&
,
parsing
::
)
{
return
<
>(
,
L"WORKFLOW-EXPRESSION"
,
,
,
,
,
);
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
,
const
&
,
,
collections
::
<
>&
,
parsing
::
)
{
return
<
>(
,
L"WORKFLOW-STATEMENT"
,
,
,
,
,
);
}
<
workflow
::
>
Workflow_ParseCoProviderStatement
(
GuiResourcePrecompileContext
&
,
,
const
&
,
,
collections
::
<
>&
,
parsing
::
)
{
return
<
>(
,
L"WORKFLOW-COPROVIDER-STATEMENT"
,
,
,
,
,
);
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
,
const
&
,
,
collections
::
<
>&
,
parsing
::
)
{
return
<
>(
,
L"WORKFLOW-MODULE"
,
,
,
,
,
);
}
(
<
workflow
::
>
)
{
return
([&](
&
)
{
(
,
L""
,
writer
);
});
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
description
::
*
,
,
const
&
,
,
collections
::
<
>&
)
{
if
(
==
description
::
<
>())
{
auto
=
<
>();
valueExpr
.
;
return
valueExpr
;
}
else
if
(
==
description
::
<
bool
>())
{
bool
=
false
;
if
(!
TypedValueSerializerProvider
<
bool
>::
(
,
value
))
return
nullptr
;
auto
=
<
>();
valueExpr
=
value
?
::
:
::
;
return
valueExpr
;
}
#define INTEGER_BRANCH(TYPE) \
else if (typeDescriptor == description::GetTypeDescriptor<TYPE>()) \
{ \
auto valueExpr = MakePtr<WfIntegerExpression>(); \
valueExpr->value.value = textValue; \
auto type = MakePtr<TypeDescriptorTypeInfo>(typeDescriptor, TypeInfoHint::Normal); \
auto infer = MakePtr<WfInferExpression>(); \
infer->type = GetTypeFromTypeInfo(type.Obj()); \
infer->expression = valueExpr; \
return infer; \
}
INTEGER_BRANCH(vint8_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vint16_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vint32_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vint64_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vuint8_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vuint16_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vuint32_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
INTEGER_BRANCH(vuint64_t)
else
if
(
==
description
::
<
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
#undef INTEGER_BRANCH
#define FLOATING_BRANCH(TYPE) \
else if (typeDescriptor == description::GetTypeDescriptor<TYPE>()) \
{ \
auto valueExpr = MakePtr<WfFloatingExpression>(); \
valueExpr->value.value = textValue; \
auto type = MakePtr<TypeDescriptorTypeInfo>(typeDescriptor, TypeInfoHint::Normal); \
auto infer = MakePtr<WfInferExpression>(); \
infer->type = GetTypeFromTypeInfo(type.Obj()); \
infer->expression = valueExpr; \
return infer; \
}
FLOATING_BRANCH(float)
else
if
(
==
description
::
<
float
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
FLOATING_BRANCH(double)
else
if
(
==
description
::
<
double
>()) {
auto
=
<
>();
valueExpr
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
valueExpr
;
return
infer
; }
#undef FLOATING_BRANCH
else
if
(
->
())
{
auto
=
<
>();
str
.
;
auto
=
<
>(
,
::
);
auto
=
<
>();
cast
(
type
.
());
cast
=
::
;
cast
str
;
return
cast
;
}
else
if
(
->
() ==
::
)
{
if
(
auto
=
(
,
,
L"{"
+
+
L"}"
,
,
, {
0
,
1
}))
{
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
=
valueExpr
;
return
infer
;
}
return
nullptr
;
}
else
if
((
->
()
::
) !=
::
)
{
if
(
auto
=
(
,
,
L"("
+
+
L")"
,
,
, {
0
,
1
}))
{
auto
=
<
>(
,
::
);
auto
=
<
>();
infer
(
type
.
());
infer
=
valueExpr
;
return
infer
;
}
return
nullptr
;
}
else
{
CHECK_FAIL(L"vl::presentation::Workflow_ParseTextValue(ITypeDescriptor*, const WString&, GuiResourceError::List&)#This is not a value type.");
do
{
throw
(
L"vl::presentation::Workflow_ParseTextValue(ITypeDescriptor*, const WString&, GuiResourceError::List&)#This is not a value type."
);}
while
(
0
);
}
}
}
}