public string Procedure(Subroutine subroutine) { var ts = new StringBuilder(); ts.Append(".method static public void " + subroutine.Name + "("); var first = true; foreach (var variable in subroutine.Vartypes.Keys) { if (!first) { ts.Append(","); } first = false; if (subroutine.Vartypes[variable] == VarType.Integer) { ts.Append("int32 " + variable); } } foreach (var s in subroutine.Statements) { var statement1 = Statements(new List <Statement>(1) { s }); } ts.Append(") il managed\n{\n.maxstack 8\n"); return(ts.ToString()); }
public void Locals(Subroutine s) { }