Example #1
0
            public override void GenerateCode(ICodeGen gen)
            {
                int local = this.GetTable().GetVariables().Sum(v => v is ParamVar ? 0 : v.GetType().GetSizeType());

                gen.StartProc(this);
                foreach (LocalVar v in this.GetTable().GetVariables())
                {
                    gen.Decl(v);
                }

                this.body.GenerateCode(gen);
                gen.EndProc();
            }
Example #2
0
 public override void GenerateCode(ICodeGen gen)
 {
     if (this.GetType() is Func)
     {
         if (this.GetType() is ExternFunc)
         {
             gen.Import(this);
         }
         else
         {
             this.GetType().GenerateCode(gen);
         }
     }
     else
     {
         gen.Decl(this);
     }
 }
Example #3
0
            public override void GenerateCode(ICodeGen gen)
            {
                int local = this.GetTable().GetVariables().Sum(v => v is ParamVar ? 0 : v.GetType().GetSizeType());
                gen.StartProc(this);
                foreach (LocalVar v in this.GetTable().GetVariables())
                {
                    gen.Decl(v);
                }

                this.body.GenerateCode(gen);
                gen.EndProc();
            }
Example #4
0
 public override void GenerateCode(ICodeGen gen)
 {
     if (this.GetType() is Func)
     {
         if (this.GetType() is ExternFunc)
         {
             gen.Import(this);
         }
         else
         {
             this.GetType().GenerateCode(gen);
         }
     }
     else
     {
         gen.Decl(this);
     }
 }