private MethodBodyElementFinder BuildFinder(string methodBody) { var methodDef = PythonCodeGenerator.GenerateFunction("ParentMethod", new string[] { }, methodBody, 0); var parser = TestParser.GetParser(methodDef); return(new MethodBodyElementFinder(GetFunctionBodyTree(parser), parser)); }
private MethodElementFinder BuildFinder(string methodDef) { var classDef = PythonCodeGenerator.GenerateClass("ParentClass", new string[] { }, methodDef); var parser = TestParser.GetParser(classDef); return(new MethodElementFinder(GetFunctionTree(parser), parser)); }
private AssignStatementElementFinder BuildFinder(string code) { var parser = TestParser.GetParser(code); return(new AssignStatementElementFinder(parser.small_stmt(), parser)); }
private IdentifierElementFinder BuildFinder(string code) { var parser = TestParser.GetParser(code); return(new IdentifierElementFinder(parser.expr_element(), parser)); }
private EmbeddedStatementElementFinder BuildFinder(string code) { var parser = TestParser.GetParser(code); return(new EmbeddedStatementElementFinder(parser.compound_stmt(), parser)); }
private MethodInvocationElementFinder BuildFinder(string code) { var parser = TestParser.GetParser(code); return(new MethodInvocationElementFinder(parser.expr_element(), parser)); }