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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 143473003: Generate ax enums from idl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Caught Blink enum conversion bug! Created 6 years, 10 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 | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/cpp_type_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index 21281fcdabfb1292bd0f8eb09519e2978061d519..c79beaec767644b1913c30fc7d4cfbddfb79e407 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -71,13 +71,6 @@ def GenerateSchema(generator,
path, filename = os.path.split(schema_filename)
short_filename, extension = os.path.splitext(filename)
- # Filenames are checked against the unix_names of the namespaces they
- # generate because the gyp uses the names of the JSON files to generate
- # the names of the .cc and .h files. We want these to be using unix_names.
- if namespace.unix_name != short_filename:
- sys.exit("Filename %s is illegal. Name files using unix_hacker style." %
- schema_filename)
-
# Construct the type generator with all the namespaces in this model.
type_generator = CppTypeGenerator(api_model,
schema_loader,
@@ -99,8 +92,8 @@ def GenerateSchema(generator,
elif generator == 'cpp':
cpp_generator = CppGenerator(type_generator, root_namespace)
generators = [
- ('%s.h' % namespace.unix_name, cpp_generator.h_generator),
- ('%s.cc' % namespace.unix_name, cpp_generator.cc_generator)
+ ('%s.h' % short_filename, cpp_generator.h_generator),
+ ('%s.cc' % short_filename, cpp_generator.cc_generator)
]
elif generator == 'dart':
generators = [
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/cpp_type_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698