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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/data.py

Issue 545433002: mojo: Generate top level enums for python bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unhelpful conditional Created 6 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: mojo/public/tools/bindings/pylib/mojom/generate/data.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/data.py b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
index 52e2f7d7386d6844a5de08185e45d049dcdf803a..130eba45c42a953b5a38209fa9d2371711d309ae 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/data.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
@@ -102,6 +102,8 @@ def FixupExpression(module, value, scope, kind):
# Allow user defined values to shadow builtins.
result = LookupValue(module.values, value[1], scope, kind)
if result:
+ if isinstance(result, tuple):
+ raise Exception('Unable to resolve expression: %r' % value[1])
viettrungluu 2014/09/05 17:05:30 Does this properly handle, e.g., using constants a
qsr 2014/09/08 09:06:08 Yes, we do have this in our test cases (mojo/publi
return result
if IsBuiltinValue(value[1]):
return mojom.BuiltinValue(value[1])

Powered by Google App Engine
This is Rietveld 408576698