コード例 #1
0
 public void SetStaticCtor(LuaConstructorAdapterExpressionSyntax function, LuaDocumentStatement document)
 {
     Contract.Assert(staticCtor_ == null);
     staticCtor_ = new LuaConstructorDeclaration()
     {
         Function = function,
         Document = document,
     };
 }
コード例 #2
0
 public void AddCtor(LuaConstructorAdapterExpressionSyntax function, bool isZeroParameters)
 {
     if (isZeroParameters)
     {
         ctors_.Insert(0, function);
     }
     else
     {
         ctors_.Add(function);
     }
 }
コード例 #3
0
        public void SetStaticCtorEmpty()
        {
            Contract.Assert(staticCtor_ == null);
            var ctor = new LuaConstructorAdapterExpressionSyntax();

            ctor.AddStatement(Empty);
            staticCtor_ = new LuaConstructorDeclaration()
            {
                Function = ctor
            };
        }
コード例 #4
0
 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,
         });
     }
 }
コード例 #5
0
 public void SetStaticCtor(LuaConstructorAdapterExpressionSyntax function)
 {
     Contract.Assert(staticcCtorStatements_.Count == 0);
     staticcCtorStatements_.AddRange(function.Body.Statements);
 }