def acceptMethodExpr(self, tree): recv = self.stringfy(tree.recv) name = str(tree.name) fd = get_corpus(f'{recv}.{name}') if len(fd) > 0: p, p2 = self.params(tree.params, fd) self.pushFuncApp(name, p, fd, p2) else: fd = get_corpus(f'.{name}') if len(fd) > 0: p, p2 = self.params(tree.params, fd) p = [recv] + p self.pushFuncApp(name, p, fd, p2) else: self.push(str(tree))
def acceptName(self, tree): name = str(tree) fd = get_corpus(name) if 'name' in fd: self.push(fd['name']) else: self.push(str(tree))
def acceptSelfAssignment(self, tree): name = str(tree.name) p = [self.stringfy(tree.left), self.stringfy(tree.right)] self.pushFuncApp(name, p, get_corpus(name))
def acceptUnary(self, tree): name = str(tree.name) p = [self.stringfy(tree.expr)] self.pushFuncApp(name, p, get_corpus(name))
def acceptApplyExpr(self, tree): name = str(tree.name) fd = get_corpus(name) p, p2 = self.params(tree.params, fd) self.pushFuncApp(name, p, fd, p2)