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

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

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: All Short Names use unsafe GetElementForName Created 4 years, 11 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/module.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index 4297afbc6c8f14a7711a8244607631d3a0a9c984..79b27b87d44216a289aa3345705f50ddba9e31f5 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -469,6 +469,10 @@ def IsFloatKind(kind):
return kind.spec == FLOAT.spec
+def IsDoubleKind(kind):
+ return kind.spec == DOUBLE.spec
+
+
def IsIntegralKind(kind):
return (kind.spec == BOOL.spec or
kind.spec == INT8.spec or
@@ -480,6 +484,11 @@ def IsIntegralKind(kind):
kind.spec == UINT32.spec or
kind.spec == UINT64.spec)
+def IsNumericalKind(kind):
+ return (IsBoolKind(kind) or
+ IsFloatKind(kind) or
+ IsDoubleKind(kind) or
+ IsIntegralKind(kind))
def IsStringKind(kind):
return kind.spec == STRING.spec or kind.spec == NULLABLE_STRING.spec

Powered by Google App Engine
This is Rietveld 408576698