private Emit.MethodBuilder GenerateMethod(Emit.MethodBuilder methb, MethodDeclaration method)
{
this.il = methb.GetILGenerator();
this.symbolTable = new Collections.Dictionary <string, Emit.LocalBuilder>();
this.parameterTable = new System.Collections.Generic.Dictionary <string, Type>();
//foreach (string arg in method.parameters)
//{
// parameterTable[arg] = typeof(string);
//}
foreach (Collections.KeyValuePair <string, Type> para in method.parameters)
{
parameterTable[para.Key] = para.Value;
}
this.GenStmt(method.stmt);
Collections.List <Type> args = new System.Collections.Generic.List <Type>();
foreach (Collections.KeyValuePair <string, Type> para in parameterTable)
{
args.Add(para.Value);
}
//foreach(string arg in method.parameters)
//{
// args.Add(typeof(string));
//}
methb.SetParameters(args.ToArray());
return(methb);
}