mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Add anonymous functions before other statements.
This commit is contained in:
parent
412247c401
commit
170a4ea08f
1 changed files with 8 additions and 2 deletions
|
|
@ -482,7 +482,10 @@ bool CodeBlock::compile(const char *codeFileName, StringTableEntry fileName, con
|
||||||
{
|
{
|
||||||
if (gAnonFunctionList)
|
if (gAnonFunctionList)
|
||||||
{
|
{
|
||||||
gStatementList->append(gAnonFunctionList);
|
// Prepend anonymous functions to statement list, so they're defined already when
|
||||||
|
// the statements run.
|
||||||
|
gAnonFunctionList->append(gStatementList);
|
||||||
|
gStatementList = gAnonFunctionList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -622,7 +625,10 @@ const char *CodeBlock::compileExec(StringTableEntry fileName, const char *inStri
|
||||||
{
|
{
|
||||||
if (gAnonFunctionList)
|
if (gAnonFunctionList)
|
||||||
{
|
{
|
||||||
gStatementList->append(gAnonFunctionList);
|
// Prepend anonymous functions to statement list, so they're defined already when
|
||||||
|
// the statements run.
|
||||||
|
gAnonFunctionList->append(gStatementList);
|
||||||
|
gStatementList = gAnonFunctionList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue