Chromium Code Reviews
DescriptionAdd enum class support to json_schema_compiler (idl files)
Allows an .idl file to generate headers with enum classes that can be
forward declared. This can help avoid a proliferation of transitive
"hard" dependencies where a generated header needs to be included from a
component's publicly exposed headers.
To change an enum to an enum class, simply prefix with [enum_class].
E.g. "enum Foo { a };" changes to "[enum_class] enum Foo { a };"
Then instead of generating
enum Foo { FOO_NONE, FOO_A, FOO_LAST = FOO_A };
generates
enum class Foo { NONE, A, LAST = A };
BUG=611898, 612382
Patch Set 1 #Patch Set 2 : rebase #Patch Set 3 : iwyu #Patch Set 4 : Adds a test #Patch Set 5 : Move AXEVent conversion to crrev.com/1988613002 #Patch Set 6 : nit python style #
Total comments: 8
Patch Set 7 : enum -> enum_class #Patch Set 8 : enum -> enum_class, TODOs #
Total comments: 4
Patch Set 9 : is_enum_class, fix ternary #Patch Set 10 : I accidentally a patchset dependency #
Messages
Total messages: 12 (7 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||