mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-01 09:51:12 +00:00
[C++] Check for case insensitive keywords (#8420)
* chore(idl): Check for case insensitive keywords Most languages are not affected by this change. In PHP, some names such as Bool cannot be used because it is a reserved keyword for to the bool data type. The field `keywords_casing` in the configs enables checking all characters in lowercase against every keyword. This should be safe as flatbuffers does not allow non-ASCII characters in its grammar. * chore: Fix formatting to follow google's coding style for enums * chore: Extract convert case to lower when CaseInsensitive --------- Co-authored-by: Justin Davis <jtdavis777@gmail.com> Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
parent
8914d06ab7
commit
d74e2945f7
12 changed files with 29 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ static const Namer::Config kConfig = {
|
|||
/*object_suffix=*/"T",
|
||||
/*keyword_prefix=*/"",
|
||||
/*keyword_suffix=*/"_",
|
||||
/*keywords_casing=*/Namer::Config::KeywordsCasing::CaseSensitive,
|
||||
/*filenames=*/Case::kKeep,
|
||||
/*directories=*/Case::kKeep,
|
||||
/*output_path=*/"",
|
||||
|
|
@ -49,6 +50,7 @@ static const Namer::Config kStubConfig = {
|
|||
/*object_suffix=*/"T",
|
||||
/*keyword_prefix=*/"",
|
||||
/*keyword_suffix=*/"_",
|
||||
/*keywords_casing=*/Namer::Config::KeywordsCasing::CaseSensitive,
|
||||
/*filenames=*/Case::kKeep,
|
||||
/*directories=*/Case::kKeep,
|
||||
/*output_path=*/"",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue