AST printing: make explicit printing of outermost block optional
commitfd08410b2b576ff982cc4795fdafc546c8571c78
authorSven Verdoolaege <sven@cerebras.net>
Thu, 23 Apr 2020 12:53:19 +0000 (23 14:53 +0200)
committerSven Verdoolaege <sven@cerebras.net>
Thu, 30 Apr 2020 21:01:38 +0000 (30 23:01 +0200)
tree545598652aecbba837647e52fb06dc86c21b445c
parent574d7040f6f3dba1038b2ba34b31b92c1087734b
AST printing: make explicit printing of outermost block optional

If the outermost node of an AST is a block node, then it always
gets printed as such.  It is not clear if this was the intention or
if this was an oversight.  Either way, the default cannot be changed now.

The extra braces corresponding to this outermost block node
can be quite distracting though, so add an option that allows
the printing of these braces to be skipped.

Note that isl_ast_node_print also gets called internally
from print_body_c, but in this case the node is known
not to be a block as otherwise need_block would have returned 1.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
doc/user.pod
include/isl/ast.h
isl_ast.c
isl_options.c
isl_options_private.h