Avoid emitting keywords as type or field names
commite43e2530354112afd15b7d824c4cc57cebc1f976
authorJake Bailey <jakebailey@fb.com>
Wed, 17 Aug 2022 20:53:14 +0000 (17 13:53 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Aug 2022 20:53:14 +0000 (17 13:53 -0700)
tree85c22d2bc412820d50a5dc8dd65c49ac5ed68d7a
parente3478e07d705bd3233aafe0844ed5bdf0b510ad0
Avoid emitting keywords as type or field names

Summary: When rendering a type or field name, add an underscore if we'd otherwise emit a keyword.

Reviewed By: edwinsmith

Differential Revision: D38774390

fbshipit-source-id: 95b6a4c2423d6afffd27c4de4a295d28882f6e60
hphp/hack/src/rust_to_ocaml/src/ir.rs
hphp/hack/src/rust_to_ocaml/src/ir/display.rs
hphp/hack/test/rust_to_ocaml/keywords.rs [new file with mode: 0644]
hphp/hack/test/rust_to_ocaml/keywords.rs.exp [new file with mode: 0644]