def parse_grpexpr(grp_ctx, tree, row_ctx, maker): if isinstance(tree, _ast.Call) and tree.func.id in FUNC_MAP: if tree.keywords: raise Exception('Keyword arguments are not supported in %r' % (tree.func.id,)) return FUNC_MAP[tree.func.id]( maker, list(parse_expr(row_ctx, arg) for arg in tree.args) ) else: return parse_expr(grp_ctx, tree, partial(parse_grpexpr, maker=maker, row_ctx=row_ctx))
def parse_assign_grpexpr(grp_ctx, tree, row_ctx, maker): return parse_assign_expr(grp_ctx, tree, partial(parse_grpexpr, maker=maker, row_ctx=row_ctx))