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

Side by Side Diff: mojo/public/tools/bindings/pylib/mojom/generate/constant_resolver.py

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Resolves the values used for constants and enums.""" 5 """Resolves the values used for constants and enums."""
6 6
7 from itertools import ifilter 7 from itertools import ifilter
8 import mojom.generate.module as mojom 8 import mojom.generate.module as mojom
9 9
10 def ResolveConstants(module, expression_to_text): 10 def ResolveConstants(module, expression_to_text):
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if isinstance(field.default, (mojom.ConstantValue, mojom.EnumValue)): 82 if isinstance(field.default, (mojom.ConstantValue, mojom.EnumValue)):
83 field.default.resolved_value = GetResolvedValue(field.default) 83 field.default.resolved_value = GetResolvedValue(field.default)
84 84
85 for interface in module.interfaces: 85 for interface in module.interfaces:
86 for constant in interface.constants: 86 for constant in interface.constants:
87 ResolveConstant(constant) 87 ResolveConstant(constant)
88 for enum in interface.enums: 88 for enum in interface.enums:
89 ResolveEnum(enum) 89 ResolveEnum(enum)
90 90
91 return module 91 return module
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/generate/__init__.py ('k') | mojo/public/tools/bindings/pylib/mojom/generate/data.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698