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

Unified Diff: mojo/public/tools/bindings/run_code_generators.py

Issue 1700443003: Use the new mojom parser from check_mojom_dart.py. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 | « mojo/public/tools/bindings/pylib/mojom/parse/parser_runner.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/run_code_generators.py
diff --git a/mojo/public/tools/bindings/run_code_generators.py b/mojo/public/tools/bindings/run_code_generators.py
index cf6b9e9bf3f506b82300259b335a7db119d67eaf..9fae27ebeea0abb2414e8037b394568f317c5c65 100755
--- a/mojo/public/tools/bindings/run_code_generators.py
+++ b/mojo/public/tools/bindings/run_code_generators.py
@@ -67,6 +67,7 @@ sys.path.insert(0, os.path.join(THIS_DIR, "pylib"))
from mojom.generate.generated import mojom_files_mojom
from mojom.generate import mojom_translator
+from mojom.parse import parser_runner
from mojo_bindings import serialization
@@ -119,10 +120,7 @@ def ReadMojomFileGraphFromFile(fp):
Returns:
The mojom_files_mojom.MojomFileGraph that was deserialized from the file.
"""
- data = bytearray(fp.read())
- context = serialization.RootDeserializationContext(data, [])
- return mojom_files_mojom.MojomFileGraph.Deserialize(context)
-
+ return parser_runner.DeserializeMojomFileGraph(fp.read())
def FixModulePath(module, abs_src_root_path):
"""Fix the path attribute of the provided module and its imports.
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/parse/parser_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698