Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulse2rust omits parentheses #219

Open
gebner opened this issue Sep 27, 2024 · 0 comments
Open

pulse2rust omits parentheses #219

gebner opened this issue Sep 27, 2024 · 0 comments

Comments

@gebner
Copy link
Contributor

gebner commented Sep 27, 2024

I only noticed this today, but the prettyplease library doesn't insert parentheses if the operator precedence requires it (nor does anything else in the syn ecosystem as far as I can tell).

module Binop

let f (x y z: (a:UInt64.t { UInt64.v a < 100 })) =
  UInt64.mul x (UInt64.add y z)
fstar.exe --codegen Extension --extract_module Binop Binop.fst
pulse2rust/main.exe -odir . Binop.ast
////
////
//// This file is generated by the Pulse2Rust tool
////
////

pub fn f(x: u64, y: u64, z: u64) -> u64 {
    x * y + z
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant