This commit is contained in:
Areloch 2017-11-05 22:33:32 -06:00
parent f51ce3084f
commit d666322a1b
23 changed files with 9203 additions and 7477 deletions

View file

@ -38,25 +38,25 @@ using namespace Compiler;
//------------------------------------------------------------
BreakStmtNode *BreakStmtNode::alloc( S32 lineNumber )
BreakStmtNode *BreakStmtNode::alloc(S32 lineNumber)
{
BreakStmtNode *ret = (BreakStmtNode *) consoleAlloc(sizeof(BreakStmtNode));
BreakStmtNode *ret = (BreakStmtNode *)consoleAlloc(sizeof(BreakStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
return ret;
}
ContinueStmtNode *ContinueStmtNode::alloc( S32 lineNumber )
ContinueStmtNode *ContinueStmtNode::alloc(S32 lineNumber)
{
ContinueStmtNode *ret = (ContinueStmtNode *) consoleAlloc(sizeof(ContinueStmtNode));
ContinueStmtNode *ret = (ContinueStmtNode *)consoleAlloc(sizeof(ContinueStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
return ret;
}
ReturnStmtNode *ReturnStmtNode::alloc( S32 lineNumber, ExprNode *expr)
ReturnStmtNode *ReturnStmtNode::alloc(S32 lineNumber, ExprNode *expr)
{
ReturnStmtNode *ret = (ReturnStmtNode *) consoleAlloc(sizeof(ReturnStmtNode));
ReturnStmtNode *ret = (ReturnStmtNode *)consoleAlloc(sizeof(ReturnStmtNode));
constructInPlace(ret);
ret->expr = expr;
ret->dbgLineNumber = lineNumber;
@ -64,9 +64,9 @@ ReturnStmtNode *ReturnStmtNode::alloc( S32 lineNumber, ExprNode *expr)
return ret;
}
IfStmtNode *IfStmtNode::alloc( S32 lineNumber, ExprNode *testExpr, StmtNode *ifBlock, StmtNode *elseBlock, bool propagate )
IfStmtNode *IfStmtNode::alloc(S32 lineNumber, ExprNode *testExpr, StmtNode *ifBlock, StmtNode *elseBlock, bool propagate)
{
IfStmtNode *ret = (IfStmtNode *) consoleAlloc(sizeof(IfStmtNode));
IfStmtNode *ret = (IfStmtNode *)consoleAlloc(sizeof(IfStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
@ -78,9 +78,9 @@ IfStmtNode *IfStmtNode::alloc( S32 lineNumber, ExprNode *testExpr, StmtNode *ifB
return ret;
}
LoopStmtNode *LoopStmtNode::alloc( S32 lineNumber, ExprNode *initExpr, ExprNode *testExpr, ExprNode *endLoopExpr, StmtNode *loopBlock, bool isDoLoop )
LoopStmtNode *LoopStmtNode::alloc(S32 lineNumber, ExprNode *initExpr, ExprNode *testExpr, ExprNode *endLoopExpr, StmtNode *loopBlock, bool isDoLoop)
{
LoopStmtNode *ret = (LoopStmtNode *) consoleAlloc(sizeof(LoopStmtNode));
LoopStmtNode *ret = (LoopStmtNode *)consoleAlloc(sizeof(LoopStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->testExpr = testExpr;
@ -92,28 +92,28 @@ LoopStmtNode *LoopStmtNode::alloc( S32 lineNumber, ExprNode *initExpr, ExprNode
// Deal with setting some dummy constant nodes if we weren't provided with
// info... This allows us to play nice with missing parts of for(;;) for
// instance.
if(!ret->testExpr) ret->testExpr = IntNode::alloc( lineNumber, 1 );
if (!ret->testExpr) ret->testExpr = IntNode::alloc(lineNumber, 1);
return ret;
}
IterStmtNode* IterStmtNode::alloc( S32 lineNumber, StringTableEntry varName, ExprNode* containerExpr, StmtNode* body, bool isStringIter )
IterStmtNode* IterStmtNode::alloc(S32 lineNumber, StringTableEntry varName, ExprNode* containerExpr, StmtNode* body, bool isStringIter)
{
IterStmtNode* ret = ( IterStmtNode* ) consoleAlloc( sizeof( IterStmtNode ) );
constructInPlace( ret );
IterStmtNode* ret = (IterStmtNode*)consoleAlloc(sizeof(IterStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->varName = varName;
ret->containerExpr = containerExpr;
ret->body = body;
ret->isStringIter = isStringIter;
return ret;
}
FloatBinaryExprNode *FloatBinaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode *left, ExprNode *right )
FloatBinaryExprNode *FloatBinaryExprNode::alloc(S32 lineNumber, S32 op, ExprNode *left, ExprNode *right)
{
FloatBinaryExprNode *ret = (FloatBinaryExprNode *) consoleAlloc(sizeof(FloatBinaryExprNode));
FloatBinaryExprNode *ret = (FloatBinaryExprNode *)consoleAlloc(sizeof(FloatBinaryExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
@ -124,9 +124,9 @@ FloatBinaryExprNode *FloatBinaryExprNode::alloc( S32 lineNumber, S32 op, ExprNod
return ret;
}
IntBinaryExprNode *IntBinaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode *left, ExprNode *right )
IntBinaryExprNode *IntBinaryExprNode::alloc(S32 lineNumber, S32 op, ExprNode *left, ExprNode *right)
{
IntBinaryExprNode *ret = (IntBinaryExprNode *) consoleAlloc(sizeof(IntBinaryExprNode));
IntBinaryExprNode *ret = (IntBinaryExprNode *)consoleAlloc(sizeof(IntBinaryExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
@ -137,9 +137,9 @@ IntBinaryExprNode *IntBinaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode *l
return ret;
}
StreqExprNode *StreqExprNode::alloc( S32 lineNumber, ExprNode *left, ExprNode *right, bool eq )
StreqExprNode *StreqExprNode::alloc(S32 lineNumber, ExprNode *left, ExprNode *right, bool eq)
{
StreqExprNode *ret = (StreqExprNode *) consoleAlloc(sizeof(StreqExprNode));
StreqExprNode *ret = (StreqExprNode *)consoleAlloc(sizeof(StreqExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->left = left;
@ -149,9 +149,9 @@ StreqExprNode *StreqExprNode::alloc( S32 lineNumber, ExprNode *left, ExprNode *r
return ret;
}
StrcatExprNode *StrcatExprNode::alloc( S32 lineNumber, ExprNode *left, ExprNode *right, S32 appendChar )
StrcatExprNode *StrcatExprNode::alloc(S32 lineNumber, ExprNode *left, ExprNode *right, S32 appendChar)
{
StrcatExprNode *ret = (StrcatExprNode *) consoleAlloc(sizeof(StrcatExprNode));
StrcatExprNode *ret = (StrcatExprNode *)consoleAlloc(sizeof(StrcatExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->left = left;
@ -161,9 +161,9 @@ StrcatExprNode *StrcatExprNode::alloc( S32 lineNumber, ExprNode *left, ExprNode
return ret;
}
CommaCatExprNode *CommaCatExprNode::alloc( S32 lineNumber, ExprNode *left, ExprNode *right )
CommaCatExprNode *CommaCatExprNode::alloc(S32 lineNumber, ExprNode *left, ExprNode *right)
{
CommaCatExprNode *ret = (CommaCatExprNode *) consoleAlloc(sizeof(CommaCatExprNode));
CommaCatExprNode *ret = (CommaCatExprNode *)consoleAlloc(sizeof(CommaCatExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->left = left;
@ -172,9 +172,9 @@ CommaCatExprNode *CommaCatExprNode::alloc( S32 lineNumber, ExprNode *left, ExprN
return ret;
}
IntUnaryExprNode *IntUnaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode *expr )
IntUnaryExprNode *IntUnaryExprNode::alloc(S32 lineNumber, S32 op, ExprNode *expr)
{
IntUnaryExprNode *ret = (IntUnaryExprNode *) consoleAlloc(sizeof(IntUnaryExprNode));
IntUnaryExprNode *ret = (IntUnaryExprNode *)consoleAlloc(sizeof(IntUnaryExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->op = op;
@ -182,9 +182,9 @@ IntUnaryExprNode *IntUnaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode *exp
return ret;
}
FloatUnaryExprNode *FloatUnaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode *expr )
FloatUnaryExprNode *FloatUnaryExprNode::alloc(S32 lineNumber, S32 op, ExprNode *expr)
{
FloatUnaryExprNode *ret = (FloatUnaryExprNode *) consoleAlloc(sizeof(FloatUnaryExprNode));
FloatUnaryExprNode *ret = (FloatUnaryExprNode *)consoleAlloc(sizeof(FloatUnaryExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->op = op;
@ -192,9 +192,9 @@ FloatUnaryExprNode *FloatUnaryExprNode::alloc( S32 lineNumber, S32 op, ExprNode
return ret;
}
VarNode *VarNode::alloc( S32 lineNumber, StringTableEntry varName, ExprNode *arrayIndex )
VarNode *VarNode::alloc(S32 lineNumber, StringTableEntry varName, ExprNode *arrayIndex)
{
VarNode *ret = (VarNode *) consoleAlloc(sizeof(VarNode));
VarNode *ret = (VarNode *)consoleAlloc(sizeof(VarNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->varName = varName;
@ -202,18 +202,18 @@ VarNode *VarNode::alloc( S32 lineNumber, StringTableEntry varName, ExprNode *arr
return ret;
}
IntNode *IntNode::alloc( S32 lineNumber, S32 value )
IntNode *IntNode::alloc(S32 lineNumber, S32 value)
{
IntNode *ret = (IntNode *) consoleAlloc(sizeof(IntNode));
IntNode *ret = (IntNode *)consoleAlloc(sizeof(IntNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->value = value;
return ret;
}
ConditionalExprNode *ConditionalExprNode::alloc( S32 lineNumber, ExprNode *testExpr, ExprNode *trueExpr, ExprNode *falseExpr )
ConditionalExprNode *ConditionalExprNode::alloc(S32 lineNumber, ExprNode *testExpr, ExprNode *trueExpr, ExprNode *falseExpr)
{
ConditionalExprNode *ret = (ConditionalExprNode *) consoleAlloc(sizeof(ConditionalExprNode));
ConditionalExprNode *ret = (ConditionalExprNode *)consoleAlloc(sizeof(ConditionalExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->testExpr = testExpr;
@ -223,22 +223,22 @@ ConditionalExprNode *ConditionalExprNode::alloc( S32 lineNumber, ExprNode *testE
return ret;
}
FloatNode *FloatNode::alloc( S32 lineNumber, F64 value )
FloatNode *FloatNode::alloc(S32 lineNumber, F64 value)
{
FloatNode *ret = (FloatNode *) consoleAlloc(sizeof(FloatNode));
FloatNode *ret = (FloatNode *)consoleAlloc(sizeof(FloatNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->value = value;
return ret;
}
StrConstNode *StrConstNode::alloc( S32 lineNumber, char *str, bool tag, bool doc )
StrConstNode *StrConstNode::alloc(S32 lineNumber, char *str, bool tag, bool doc)
{
StrConstNode *ret = (StrConstNode *) consoleAlloc(sizeof(StrConstNode));
StrConstNode *ret = (StrConstNode *)consoleAlloc(sizeof(StrConstNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->str = (char *) consoleAlloc(dStrlen(str) + 1);
ret->str = (char *)consoleAlloc(dStrlen(str) + 1);
ret->tag = tag;
ret->doc = doc;
dStrcpy(ret->str, str);
@ -246,18 +246,18 @@ StrConstNode *StrConstNode::alloc( S32 lineNumber, char *str, bool tag, bool doc
return ret;
}
ConstantNode *ConstantNode::alloc( S32 lineNumber, StringTableEntry value )
ConstantNode *ConstantNode::alloc(S32 lineNumber, StringTableEntry value)
{
ConstantNode *ret = (ConstantNode *) consoleAlloc(sizeof(ConstantNode));
ConstantNode *ret = (ConstantNode *)consoleAlloc(sizeof(ConstantNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->value = value;
return ret;
}
AssignExprNode *AssignExprNode::alloc( S32 lineNumber, StringTableEntry varName, ExprNode *arrayIndex, ExprNode *expr )
AssignExprNode *AssignExprNode::alloc(S32 lineNumber, StringTableEntry varName, ExprNode *arrayIndex, ExprNode *expr)
{
AssignExprNode *ret = (AssignExprNode *) consoleAlloc(sizeof(AssignExprNode));
AssignExprNode *ret = (AssignExprNode *)consoleAlloc(sizeof(AssignExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->varName = varName;
@ -267,9 +267,9 @@ AssignExprNode *AssignExprNode::alloc( S32 lineNumber, StringTableEntry varName,
return ret;
}
AssignOpExprNode *AssignOpExprNode::alloc( S32 lineNumber, StringTableEntry varName, ExprNode *arrayIndex, ExprNode *expr, S32 op )
AssignOpExprNode *AssignOpExprNode::alloc(S32 lineNumber, StringTableEntry varName, ExprNode *arrayIndex, ExprNode *expr, S32 op)
{
AssignOpExprNode *ret = (AssignOpExprNode *) consoleAlloc(sizeof(AssignOpExprNode));
AssignOpExprNode *ret = (AssignOpExprNode *)consoleAlloc(sizeof(AssignOpExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->varName = varName;
@ -279,9 +279,9 @@ AssignOpExprNode *AssignOpExprNode::alloc( S32 lineNumber, StringTableEntry varN
return ret;
}
TTagSetStmtNode *TTagSetStmtNode::alloc( S32 lineNumber, StringTableEntry tag, ExprNode *valueExpr, ExprNode *stringExpr )
TTagSetStmtNode *TTagSetStmtNode::alloc(S32 lineNumber, StringTableEntry tag, ExprNode *valueExpr, ExprNode *stringExpr)
{
TTagSetStmtNode *ret = (TTagSetStmtNode *) consoleAlloc(sizeof(TTagSetStmtNode));
TTagSetStmtNode *ret = (TTagSetStmtNode *)consoleAlloc(sizeof(TTagSetStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->tag = tag;
@ -290,37 +290,37 @@ TTagSetStmtNode *TTagSetStmtNode::alloc( S32 lineNumber, StringTableEntry tag, E
return ret;
}
TTagDerefNode *TTagDerefNode::alloc( S32 lineNumber, ExprNode *expr )
TTagDerefNode *TTagDerefNode::alloc(S32 lineNumber, ExprNode *expr)
{
TTagDerefNode *ret = (TTagDerefNode *) consoleAlloc(sizeof(TTagDerefNode));
TTagDerefNode *ret = (TTagDerefNode *)consoleAlloc(sizeof(TTagDerefNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->expr = expr;
return ret;
}
TTagExprNode *TTagExprNode::alloc( S32 lineNumber, StringTableEntry tag )
TTagExprNode *TTagExprNode::alloc(S32 lineNumber, StringTableEntry tag)
{
TTagExprNode *ret = (TTagExprNode *) consoleAlloc(sizeof(TTagExprNode));
TTagExprNode *ret = (TTagExprNode *)consoleAlloc(sizeof(TTagExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->tag = tag;
return ret;
}
FuncCallExprNode *FuncCallExprNode::alloc( S32 lineNumber, StringTableEntry funcName, StringTableEntry nameSpace, ExprNode *args, bool dot )
FuncCallExprNode *FuncCallExprNode::alloc(S32 lineNumber, StringTableEntry funcName, StringTableEntry nameSpace, ExprNode *args, bool dot)
{
FuncCallExprNode *ret = (FuncCallExprNode *) consoleAlloc(sizeof(FuncCallExprNode));
FuncCallExprNode *ret = (FuncCallExprNode *)consoleAlloc(sizeof(FuncCallExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->funcName = funcName;
ret->nameSpace = nameSpace;
ret->args = args;
if(dot)
if (dot)
ret->callType = MethodCall;
else
{
if(nameSpace && !dStricmp(nameSpace, "Parent"))
if (nameSpace && !dStricmp(nameSpace, "Parent"))
ret->callType = ParentCall;
else
ret->callType = FunctionCall;
@ -328,27 +328,37 @@ FuncCallExprNode *FuncCallExprNode::alloc( S32 lineNumber, StringTableEntry func
return ret;
}
AssertCallExprNode *AssertCallExprNode::alloc( S32 lineNumber, ExprNode *testExpr, const char *message )
FuncPointerCallExprNode *FuncPointerCallExprNode::alloc(S32 lineNumber, ExprNode *funcPointer, ExprNode *args)
{
#ifdef TORQUE_ENABLE_SCRIPTASSERTS
AssertCallExprNode *ret = (AssertCallExprNode *) consoleAlloc(sizeof(FuncCallExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->testExpr = testExpr;
ret->message = message ? message : "TorqueScript assert!";
return ret;
#else
return NULL;
#endif
FuncPointerCallExprNode *ret = (FuncPointerCallExprNode *)consoleAlloc(sizeof(FuncPointerCallExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->funcPointer = funcPointer;
ret->args = args;
return ret;
}
SlotAccessNode *SlotAccessNode::alloc( S32 lineNumber, ExprNode *objectExpr, ExprNode *arrayExpr, StringTableEntry slotName )
AssertCallExprNode *AssertCallExprNode::alloc(S32 lineNumber, ExprNode *testExpr, const char *message)
{
SlotAccessNode *ret = (SlotAccessNode *) consoleAlloc(sizeof(SlotAccessNode));
#ifdef TORQUE_ENABLE_SCRIPTASSERTS
AssertCallExprNode *ret = (AssertCallExprNode *)consoleAlloc(sizeof(FuncCallExprNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->testExpr = testExpr;
ret->message = message ? message : "TorqueScript assert!";
return ret;
#else
return NULL;
#endif
}
SlotAccessNode *SlotAccessNode::alloc(S32 lineNumber, ExprNode *objectExpr, ExprNode *arrayExpr, StringTableEntry slotName)
{
SlotAccessNode *ret = (SlotAccessNode *)consoleAlloc(sizeof(SlotAccessNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->objectExpr = objectExpr;
@ -357,9 +367,9 @@ SlotAccessNode *SlotAccessNode::alloc( S32 lineNumber, ExprNode *objectExpr, Exp
return ret;
}
InternalSlotAccessNode *InternalSlotAccessNode::alloc( S32 lineNumber, ExprNode *objectExpr, ExprNode *slotExpr, bool recurse )
InternalSlotAccessNode *InternalSlotAccessNode::alloc(S32 lineNumber, ExprNode *objectExpr, ExprNode *slotExpr, bool recurse)
{
InternalSlotAccessNode *ret = (InternalSlotAccessNode *) consoleAlloc(sizeof(InternalSlotAccessNode));
InternalSlotAccessNode *ret = (InternalSlotAccessNode *)consoleAlloc(sizeof(InternalSlotAccessNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->objectExpr = objectExpr;
@ -368,9 +378,9 @@ InternalSlotAccessNode *InternalSlotAccessNode::alloc( S32 lineNumber, ExprNode
return ret;
}
SlotAssignNode *SlotAssignNode::alloc( S32 lineNumber, ExprNode *objectExpr, ExprNode *arrayExpr, StringTableEntry slotName, ExprNode *valueExpr, U32 typeID /* = -1 */ )
SlotAssignNode *SlotAssignNode::alloc(S32 lineNumber, ExprNode *objectExpr, ExprNode *arrayExpr, StringTableEntry slotName, ExprNode *valueExpr, U32 typeID /* = -1 */)
{
SlotAssignNode *ret = (SlotAssignNode *) consoleAlloc(sizeof(SlotAssignNode));
SlotAssignNode *ret = (SlotAssignNode *)consoleAlloc(sizeof(SlotAssignNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->objectExpr = objectExpr;
@ -381,9 +391,9 @@ SlotAssignNode *SlotAssignNode::alloc( S32 lineNumber, ExprNode *objectExpr, Exp
return ret;
}
SlotAssignOpNode *SlotAssignOpNode::alloc( S32 lineNumber, ExprNode *objectExpr, StringTableEntry slotName, ExprNode *arrayExpr, S32 op, ExprNode *valueExpr )
SlotAssignOpNode *SlotAssignOpNode::alloc(S32 lineNumber, ExprNode *objectExpr, StringTableEntry slotName, ExprNode *arrayExpr, S32 op, ExprNode *valueExpr)
{
SlotAssignOpNode *ret = (SlotAssignOpNode *) consoleAlloc(sizeof(SlotAssignOpNode));
SlotAssignOpNode *ret = (SlotAssignOpNode *)consoleAlloc(sizeof(SlotAssignOpNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->objectExpr = objectExpr;
@ -394,9 +404,9 @@ SlotAssignOpNode *SlotAssignOpNode::alloc( S32 lineNumber, ExprNode *objectExpr,
return ret;
}
ObjectDeclNode *ObjectDeclNode::alloc( S32 lineNumber, ExprNode *classNameExpr, ExprNode *objectNameExpr, ExprNode *argList, StringTableEntry parentObject, SlotAssignNode *slotDecls, ObjectDeclNode *subObjects, bool isDatablock, bool classNameInternal, bool isSingleton )
ObjectDeclNode *ObjectDeclNode::alloc(S32 lineNumber, ExprNode *classNameExpr, ExprNode *objectNameExpr, ExprNode *argList, StringTableEntry parentObject, SlotAssignNode *slotDecls, ObjectDeclNode *subObjects, bool isDatablock, bool classNameInternal, bool isSingleton)
{
ObjectDeclNode *ret = (ObjectDeclNode *) consoleAlloc(sizeof(ObjectDeclNode));
ObjectDeclNode *ret = (ObjectDeclNode *)consoleAlloc(sizeof(ObjectDeclNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->classNameExpr = classNameExpr;
@ -408,16 +418,16 @@ ObjectDeclNode *ObjectDeclNode::alloc( S32 lineNumber, ExprNode *classNameExpr,
ret->isClassNameInternal = classNameInternal;
ret->isSingleton = isSingleton;
ret->failOffset = 0;
if(parentObject)
if (parentObject)
ret->parentObject = parentObject;
else
ret->parentObject = StringTable->EmptyString();
return ret;
}
FunctionDeclStmtNode *FunctionDeclStmtNode::alloc( S32 lineNumber, StringTableEntry fnName, StringTableEntry nameSpace, VarNode *args, StmtNode *stmts )
FunctionDeclStmtNode *FunctionDeclStmtNode::alloc(S32 lineNumber, StringTableEntry fnName, StringTableEntry nameSpace, VarNode *args, StmtNode *stmts)
{
FunctionDeclStmtNode *ret = (FunctionDeclStmtNode *) consoleAlloc(sizeof(FunctionDeclStmtNode));
FunctionDeclStmtNode *ret = (FunctionDeclStmtNode *)consoleAlloc(sizeof(FunctionDeclStmtNode));
constructInPlace(ret);
ret->dbgLineNumber = lineNumber;
ret->fnName = fnName;