Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: mojo/public/tools/bindings/generators/mojom_cpp_generator.py

Issue 2888503002: Mojo bindings generator: introduce Stylizer to specify naming rules. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/mojom_java_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/mojom_cpp_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index 7b55afc9b549f743c21dc4a9cbc9e1b7bb76ae80..07beca7b317398e0adc264c64b1e213cdd7d9006 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -381,21 +381,21 @@ class Generator(generator.Generator):
return self._GetJinjaExports()
def GenerateFiles(self, args):
+ self.module.Stylize(generator.Stylizer())
+
if self.generate_non_variant_code:
self.Write(self._GenerateModuleSharedHeader(),
- self.MatchMojomFilePath("%s-shared.h" % self.module.name))
- self.Write(
- self._GenerateModuleSharedInternalHeader(),
- self.MatchMojomFilePath("%s-shared-internal.h" % self.module.name))
+ "%s-shared.h" % self.module.path)
+ self.Write(self._GenerateModuleSharedInternalHeader(),
+ "%s-shared-internal.h" % self.module.path)
self.Write(self._GenerateModuleSharedSource(),
- self.MatchMojomFilePath("%s-shared.cc" % self.module.name))
+ "%s-shared.cc" % self.module.path)
else:
suffix = "-%s" % self.variant if self.variant else ""
self.Write(self._GenerateModuleHeader(),
- self.MatchMojomFilePath("%s%s.h" % (self.module.name, suffix)))
- self.Write(
- self._GenerateModuleSource(),
- self.MatchMojomFilePath("%s%s.cc" % (self.module.name, suffix)))
+ "%s%s.h" % (self.module.path, suffix))
+ self.Write(self._GenerateModuleSource(),
+ "%s%s.cc" % (self.module.path, suffix))
def _ConstantValue(self, constant):
return self._ExpressionToText(constant.value, kind=constant.kind)
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/mojom_java_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698