mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 08:32:40 +00:00
[C#] Handle keywords (#6775)
* Handle keywords in C# C# should handle keywords similarly to other languages by appending an underscore after the keyword. * Fix clang-format for idl_gen_csharp.cpp * Fix spacing clang-format issue
This commit is contained in:
14
tests/keyword_test.fbs
Normal file
14
tests/keyword_test.fbs
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
enum ABC: int { void, where, stackalloc }
|
||||
|
||||
enum public: int { }
|
||||
|
||||
table KeywordsInTable {
|
||||
is: ABC = void;
|
||||
private: public;
|
||||
}
|
||||
|
||||
union KeywordsInUnion {
|
||||
static: KeywordsInTable,
|
||||
internal: string
|
||||
}
|
||||
Reference in New Issue
Block a user