Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/mojom_dart_generator.py |
| diff --git a/mojo/public/tools/bindings/generators/mojom_dart_generator.py b/mojo/public/tools/bindings/generators/mojom_dart_generator.py |
| index 5dbc1ba14d0d67dc02b3c7be43a2e6e0ccf9dc0a..2a7cffab5876adb5c840dd65f635b80741ac3bc0 100644 |
| --- a/mojo/public/tools/bindings/generators/mojom_dart_generator.py |
| +++ b/mojo/public/tools/bindings/generators/mojom_dart_generator.py |
| @@ -20,12 +20,12 @@ from mojom.generate.template_expander import UseJinja |
| GENERATOR_PREFIX = 'dart' |
| # CAUTION: To generate Dart-style names, and to avoid generating reserved words |
| -# for identifiers. The template files should generate names using |
| +# for identifiers, the template files should generate names using |
| # {{element|name}}, not {{element.name}}. |
| # Dart reserved words from: |
| # http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-408.pdf |
| -# We must not generated reserved words for identifiers. |
| +# We must not generate reserved words for identifiers. |
| # NB: async, await, and yield are not technically reserved words, but since |
| # they are not valid identifiers in all contexts, we include them here as well. |
| _dart_reserved_words = [ |
| @@ -67,8 +67,19 @@ _dart_reserved_words = [ |
| "yield", |
| ] |
| +# These names are the class fields and methods of the Proxy class in |
| +# lib/src/proxy.dart of Dart's mojo package. If these names appear in a .mojom |
| +# they must be mangled to avoid name conflicts. |
| _reserved_words = _dart_reserved_words + [ |
| + "close", |
|
Cutch
2016/05/12 17:24:27
how are these mangled? Never mind, found in other
zra
2016/05/12 18:22:42
Expanded comment.
|
| + "connectToService", |
| + "ctrl", |
| + "fromEndpoint", |
| + "fromHandle", |
| + "newFromEndpoint", |
| + "responseOrError", |
| "serviceName", |
| + "unbound", |
| ] |
| _kind_to_dart_default_value = { |