ocaml / opam-file-format

Parser and printer for the opam file syntax
Other
15 stars 23 forks source link

OpamPrinter.format_value does not handle precedence #56

Open emillon opened 1 year ago

emillon commented 1 year ago

Hi, When passed to OpamPrinter.format_value, the expression (a | b) & c is printed as a | b & c, which is equivalent to a | (b & c). The function does not seem to have any way of printing parentheses (but the corresponding function in opam-format seems to work). See ocaml/dune#3431. Thanks!