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

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

Issue 317073005: Mojom: Add 'default' keyword for initializing structs to non-null value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/generator.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
index 96246a2e355fd3e5dae88fb65ace9e1ba8a55766..707028568c3ccea4ee07c49e45fa6c2a6ee698d0 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py
@@ -60,18 +60,6 @@ def IsMoveOnlyKind(kind):
def StudlyCapsToCamel(studly):
return studly[0].lower() + studly[1:]
-def VerifyTokenType(token, expected):
- """Used to check that arrays and objects are used correctly as default
- values. Arrays are tokens that look like ('ARRAY', element0, element1...).
- See mojom_parser.py for their representation.
- """
- if not isinstance(token, tuple):
- raise Exception("Expected token type '%s'. Invalid token '%s'." %
- (expected, token))
- if token[0] != expected:
- raise Exception("Expected token type '%s'. Got '%s'." %
- (expected, token[0]))
-
class Generator(object):
# Pass |output_dir| to emit files to disk. Omit |output_dir| to echo all
# files to stdout.
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_js_generator.py ('k') | mojo/public/tools/bindings/pylib/mojom/parse/lexer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698