ZoKrates
ZoKrates copied to clipboard
Incorrect block expression formatting in typed AST
Description
Add depth info to the expression part of the AST so we can print with proper indentation as we do with statements.
Steps to Reproduce
Compile the code below with --isolate-branches
flag and with RUST_LOG
set to trace
def main(bool a) -> field {
return if a { 1f } else { 2f };
}
This currently prints as:
def main(bool a) -> field {
return if a {
1f
} else {
2f
};
}