diff --git a/expr.v b/expr.v index 1a1037b..557d3b0 100644 --- a/expr.v +++ b/expr.v @@ -119,7 +119,7 @@ fn (mut app App) binary_expr(b BinaryExpr) { } fn (mut app App) unary_expr(u UnaryExpr) { - if u.op == '^' { + if false && u.op == '^' { // In Go bitwise NOT is ^x // In V it's ~x, ^ is only used for XOR: x^b app.gen('~') diff --git a/main.v b/main.v index 66df64f..ece6df9 100644 --- a/main.v +++ b/main.v @@ -133,7 +133,10 @@ fn (mut app App) translate_file(go_file_path string) { v_path := go_file_path.replace('.go', '.v') os.write_file(v_path, generated_v_code) or { panic(err) } println('${v_path} has been successfully generated') - os.system('v -translated-go fmt -w ${v_path}') + res := os.system('v -translated-go fmt -w ${v_path}') + if res != 0 { + exit(1) + } } fn (mut app App) run_test(subdir string, test_name string) ! {