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); }
public Parser(Token head) { this.head = head; cline = 0; _VARS = new System.Collections.Generic.Dictionary <string, string>(); _PIPES = new System.Collections.Generic.Dictionary <string, System.IO.StreamReader>(); }
public Scanner(IO.TextReader input) { this.result = new Collections.List <object>(); tokenLineNumber = new System.Collections.Generic.Dictionary <int, int>(); languageSetting = ParserLanguageSetting.GetInstance("languageSetting.xml"); currentLineNumber = 1; this.Scan(input); }