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

Unified Diff: tools/json_schema_compiler/cpp_bundle_generator.py

Issue 23549025: Clean up JSON Schema Compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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
Index: tools/json_schema_compiler/cpp_bundle_generator.py
diff --git a/tools/json_schema_compiler/cpp_bundle_generator.py b/tools/json_schema_compiler/cpp_bundle_generator.py
index 580bca852080297cb3829eaa29b214b2664e0b10..8e303d8dcaf15ac8688cf8353c0d256863d45b1c 100644
--- a/tools/json_schema_compiler/cpp_bundle_generator.py
+++ b/tools/json_schema_compiler/cpp_bundle_generator.py
@@ -36,7 +36,7 @@ class CppBundleGenerator(object):
"""
def __init__(self, root, model, api_defs, cpp_type_generator, cpp_namespace):
- self._root = root;
+ self._root = root
self._model = model
self._api_defs = api_defs
self._cpp_type_generator = cpp_type_generator
@@ -147,7 +147,7 @@ class _APIHGenerator(object):
c.Sblock(' public:')
c.Append('static void RegisterAll('
'ExtensionFunctionRegistry* registry);')
- c.Eblock('};');
+ c.Eblock('};')
c.Append()
c.Concat(cpp_util.CloseNamespace(self._bundle._cpp_namespace))
return self._bundle._GenerateHeader('generated_api', c)
@@ -208,7 +208,7 @@ class _SchemasHGenerator(object):
c = code.Code()
c.Append('#include <map>')
c.Append('#include <string>')
- c.Append();
+ c.Append()
c.Append('#include "base/strings/string_piece.h"')
c.Append()
c.Concat(cpp_util.OpenNamespace(self._bundle._cpp_namespace))
@@ -220,7 +220,7 @@ class _SchemasHGenerator(object):
c.Append()
c.Append('// Gets the API schema named |name|.')
c.Append('static base::StringPiece Get(const std::string& name);')
- c.Eblock('};');
+ c.Eblock('};')
c.Append()
c.Concat(cpp_util.CloseNamespace(self._bundle._cpp_namespace))
return self._bundle._GenerateHeader('generated_schemas', c)
@@ -267,10 +267,10 @@ class _SchemasCCGenerator(object):
namespace = self._bundle._model.namespaces[api.get('namespace')]
c.Append('schemas["%s"] = %s;' % (namespace.name,
_FormatNameAsConstant(namespace.name)))
- c.Eblock('}');
+ c.Eblock('}')
c.Append()
c.Append('std::map<std::string, const char*> schemas;')
- c.Eblock('};');
+ c.Eblock('};')
c.Append()
c.Append('base::LazyInstance<Static> g_lazy_instance;')
c.Append()

Powered by Google App Engine
This is Rietveld 408576698