(&self, field_name: &'a str)
| 20 | |
| 21 | impl<'opts> Cpp<'opts> { |
| 22 | fn cpp_field_name<'a>(&self, field_name: &'a str) -> &'a str { |
| 23 | match field_name { |
| 24 | "alignas" | "alignof" | "and" | "and_eq" | "asm" | "atomic_cancel" | "atomic_commit" |
| 25 | | "atomic_noexcept" | "auto" | "bitand" | "bitor" | "bool" | "break" | "case" | "catch" | "char" |
| 26 | | "char8_t" | "char16_t" | "char32_t" | "class" | "compl" | "concept" | "const" | "consteval" |
| 27 | | "constexpr" | "constinit" | "const_cast" | "continue" | "co_await" | "co_return" | "co_yield" |
| 28 | | "decltype" | "default" | "delete" | "do" | "double" | "dynamic_cast" | "else" | "enum" | "explicit" |
| 29 | | "export" | "extern" | "false" | "float" | "for" | "friend" | "goto" | "if" | "inline" | "int" |
| 30 | | "long" | "mutable" | "namespace" | "new" | "noexcept" | "not" | "not_eq" | "nullptr" | "operator" |
| 31 | | "or" | "or_eq" | "private" | "protected" | "public" | "register" | "reinterpret_cast" | "requires" |
| 32 | | "return" | "short" | "signed" | "sizeof" | "static" | "static_assert" | "static_cast" | "struct" |
| 33 | | "switch" | "template" | "this" | "thread_local" | "throw" | "true" | "try" | "typedef" | "typeid" |
| 34 | | "typename" | "union" | "unsigned" | "using" | "virtual" | "void" | "volatile" | "wchar_t" | "while" |
| 35 | | "xor" | "xor_eq" => "", |
| 36 | _ => field_name, |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | fn write_cpp_field_name(&self, output: &mut String, field_name: &str) -> fmt::Result { |
| 41 | let escaped = self.cpp_field_name(field_name); |
no outgoing calls
no test coverage detected