Merge branch 'feature/literal-bytes-again-again' into 'dev'
Fix literal bytes printing again See merge request ligolang/ligo!423
This commit is contained in:
commit
c04cd69103
@ -166,7 +166,7 @@ let literal ppf (l : literal) =
|
|||||||
| Literal_string s ->
|
| Literal_string s ->
|
||||||
fprintf ppf "%S" s
|
fprintf ppf "%S" s
|
||||||
| Literal_bytes b ->
|
| Literal_bytes b ->
|
||||||
fprintf ppf "0x%s" @@ Bytes.to_string @@ Bytes.escaped b
|
fprintf ppf "0x%a" Hex.pp (Hex.of_bytes b)
|
||||||
| Literal_address s ->
|
| Literal_address s ->
|
||||||
fprintf ppf "@%S" s
|
fprintf ppf "@%S" s
|
||||||
| Literal_operation _ ->
|
| Literal_operation _ ->
|
||||||
|
5
src/stages/common/test.ml
Normal file
5
src/stages/common/test.ml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
open PP
|
||||||
|
|
||||||
|
let%expect_test _ =
|
||||||
|
Format.printf "%a" literal (Literal_bytes (Bytes.of_string "foo")) ;
|
||||||
|
[%expect{| 0x666f6f |}]
|
Loading…
Reference in New Issue
Block a user