public void SetStaticCtor(LuaConstructorAdapterExpressionSyntax function, LuaDocumentStatement document) { Contract.Assert(staticCtor_ == null); staticCtor_ = new LuaConstructorDeclaration() { Function = function, Document = document, }; }
public void AddCtor(LuaConstructorAdapterExpressionSyntax function, bool isZeroParameters) { if (isZeroParameters) { ctors_.Insert(0, function); } else { ctors_.Add(function); } }
public void SetStaticCtorEmpty() { Contract.Assert(staticCtor_ == null); var ctor = new LuaConstructorAdapterExpressionSyntax(); ctor.AddStatement(Empty); staticCtor_ = new LuaConstructorDeclaration() { Function = ctor }; }
public void AddCtor(LuaConstructorAdapterExpressionSyntax function, bool insertFirst, LuaDocumentStatement document = null) { if (insertFirst) { ctors_.Insert(0, new LuaConstructorDeclaration() { Function = function, Document = document, }); } else { ctors_.Add(new LuaConstructorDeclaration() { Function = function, Document = document, }); } }
public void SetStaticCtor(LuaConstructorAdapterExpressionSyntax function) { Contract.Assert(staticcCtorStatements_.Count == 0); staticcCtorStatements_.AddRange(function.Body.Statements); }