Skip to content

Commit

Permalink
Added the changed rust file
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteEchoes committed Dec 29, 2023
1 parent 0ac7c48 commit 8b03911
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,12 @@ pub(crate) enum StructOrVariant {
}

pub(crate) fn to_valid_coq_name(str: &str) -> String {
let reserved_names = ["Set", "Type", "Unset", "by", "exists"];
let reserved_names = ["Set", "Type", "Unset", "by", "exists", "end"];

if reserved_names.contains(&str) {
return format!("{}_", str);
}

let reserved_struct_names = ["end"];

if reserved_struct_names.contains(&str) {
return format!("_{}", str);
}

let str = str::replace(str, "$", "_");
let str = str::replace(&str, "{{root}}", "CoqOfRust");
str::replace(&str, "::", ".")
Expand Down

0 comments on commit 8b03911

Please sign in to comment.