Skip to content

Commit

Permalink
Namersw (#7167)
Browse files Browse the repository at this point in the history
* Define and use Namer overloads

* more

* NamespacedType needs a public string-like overload

* Move Rust FieldOffsetName to Namer LegacyRustFieldOffsetName

* Started swift

* More Namer updates

* Remove more usage of the variable 'name' which was semantically overloaded

* unshadow varible

* Make ptr to bool explicit

Co-authored-by: Casper Neo <cneo@google.com>
  • Loading branch information
CasperN and Casper Neo committed Mar 13, 2022
1 parent 2b2e8d4 commit 8468eab
Show file tree
Hide file tree
Showing 5 changed files with 434 additions and 481 deletions.
1 change: 1 addition & 0 deletions src/idl_gen_go.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Namer::Config GoDefaultConfig() {
/*variables=*/Case::kLowerCamel,
/*variants=*/Case::kKeep,
/*enum_variant_seperator=*/"", // I.e. Concatenate.
/*escape_keywords=*/Namer::Config::Escape::BeforeConvertingCase,
/*namespaces=*/Case::kKeep,
/*namespace_seperator=*/"__",
/*object_prefix=*/"",
Expand Down
1 change: 1 addition & 0 deletions src/idl_gen_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Namer::Config PythonDefaultConfig() {
/*variable=*/Case::kLowerCamel,
/*variants=*/Case::kKeep,
/*enum_variant_seperator=*/".",
/*escape_keywords=*/Namer::Config::Escape::BeforeConvertingCase,
/*namespaces=*/Case::kKeep, // Packages in python.
/*namespace_seperator=*/".",
/*object_prefix=*/"",
Expand Down
1 change: 1 addition & 0 deletions src/idl_gen_rust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Namer::Config RustDefaultConfig() {
/*variables=*/Case::kUnknown, // Unused.
/*variants=*/Case::kKeep,
/*enum_variant_seperator=*/"::",
/*escape_keywords=*/Namer::Config::Escape::BeforeConvertingCase,
/*namespaces=*/Case::kSnake,
/*namespace_seperator=*/"::",
/*object_prefix=*/"",
Expand Down

0 comments on commit 8468eab

Please sign in to comment.