public static ASTNode writeFunction(boolean isSuper, FunctionCall lhs, ASTNode rhs) { if (lhs.args.size() > 0) { ASTNode first = lhs.args.first().getValue(); if (!(first instanceof SimpleAccessVariable)) { return new UpdateExpression(isSuper, lhs, rhs); } else { lhs.args.add("value", rhs); } } lhs.name = RSymbol.getSymbol(lhs.name.pretty() + "<-"); lhs.isAssignment(true); lhs.isSuper(isSuper); return lhs; }