From 8a3b97afd8062c65d132eb227329e8db8aae485c Mon Sep 17 00:00:00 2001 From: Richard Shank Date: Tue, 17 Sep 2024 17:41:49 +0200 Subject: [PATCH] add ocaml builtin types to keywords --- src/compilerlib/pb_codegen_backend.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compilerlib/pb_codegen_backend.ml b/src/compilerlib/pb_codegen_backend.ml index 0e10c7b8..0fad4204 100644 --- a/src/compilerlib/pb_codegen_backend.ml +++ b/src/compilerlib/pb_codegen_backend.ml @@ -69,7 +69,8 @@ let fix_ocaml_keyword_conflict s = | "new" | "nonrec" | "object" | "of" | "open" | "or" | "private" | "rec" | "sig" | "struct" | "then" | "to" | "true" | "try" | "type" | "unit" | "val" | "virtual" | "when" | "while" | "with" | "mod" | "land" | "lor" | "lxor" - | "lsl" | "lsr" | "asr" -> + | "lsl" | "lsr" | "asr" | "option" | "list" | "string" | "int" | "float" + | "array" | "char" | "bytes" | "bool" | "nativeint" | "int32" | "int64" -> s ^ "_" | _ -> s