Index: tools/json_schema_compiler/idl_schema.py |
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py |
index 31e0a273233eec50e23cd85ba7471f3593657984..7364800ee2437ab25445d08166d497b93397cffd 100755 |
--- a/tools/json_schema_compiler/idl_schema.py |
+++ b/tools/json_schema_compiler/idl_schema.py |
@@ -471,6 +471,16 @@ def Load(filename): |
contents = f.read() |
f.close() |
+ return Process(contents, filename) |
+ |
+ |
+def Process(contents, filename): |
+ ''' |
+ Processes the contents of a file and returns an equivalent Python dictionary |
+ in a format that the JSON schema compiler expects to see. (Separate from |
+ Load primarily for testing purposes.) |
+ ''' |
+ |
idl = idl_parser.IDLParser().ParseData(contents, filename) |
idl_schema = IDLSchema(idl) |
return idl_schema.process() |