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(); }
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); } }