From: NeilBrown Date: Mon, 6 Dec 2021 06:37:09 +0000 (+1100) Subject: oceani: don't add extra indent for Declare and Assign X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=9c3c0e628883128ce89c34c177c1b5bb534ea69d oceani: don't add extra indent for Declare and Assign when printing a declaration or assignment we indent the whole statement, but NOT the individual parts. Signed-off-by: NeilBrown --- diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 5dee6d2..2398fb3 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -4293,9 +4293,9 @@ it is declared, and error will be raised as the name is created as case Assign: do_indent(indent, ""); - print_exec(b->left, indent, bracket); + print_exec(b->left, -1, bracket); printf(" = "); - print_exec(b->right, indent, bracket); + print_exec(b->right, -1, bracket); if (indent >= 0) printf("\n"); break; @@ -4304,7 +4304,7 @@ it is declared, and error will be raised as the name is created as { struct variable *v = cast(var, b->left)->var; do_indent(indent, ""); - print_exec(b->left, indent, bracket); + print_exec(b->left, -1, bracket); if (cast(var, b->left)->var->constant) { printf("::"); if (v->explicit_type) { @@ -4320,7 +4320,7 @@ it is declared, and error will be raised as the name is created as } if (b->right) { printf("= "); - print_exec(b->right, indent, bracket); + print_exec(b->right, -1, bracket); } if (indent >= 0) printf("\n");