Commit Diff


commit - dcb493d24f4a8156d98ed231d3942ff51fda7722
commit + 3e23847c5a3bd90213c8b080f0c19094eb5707a3
blob - 2863b23eb89a7a1c106b5478db92eded770b91a5
blob + 71ba49d74d6d53926437437b20dde74eaecdea0d
--- script.c
+++ script.c
@@ -480,6 +480,8 @@ val_cast(struct value *a, int totype)
 void
 pp_op(struct op *op)
 {
+	struct op	*aux;
+
 	switch (op->type) {
 	case OP_ASSIGN:
 		printf("%s = ", op->v.assign.name);
@@ -490,7 +492,13 @@ pp_op(struct op *op)
 		pp_op(op->v.assert);
 		break;
 	case OP_FUNCALL:
-		printf("funcall()");
+		printf("funcall %s(", op->v.funcall.proc->name);
+		for (aux = op->v.funcall.argv; aux != NULL; aux = aux->next) {
+			pp_op(aux);
+			if (aux->next != NULL)
+				printf(", ");
+		}
+		printf(")");
 		break;
 	case OP_LITERAL:
                 pp_val(&op->v.literal);