Chromium Code Reviews| Index: lib/compiler/implementation/dart_backend/backend.dart |
| diff --git a/lib/compiler/implementation/dart_backend/backend.dart b/lib/compiler/implementation/dart_backend/backend.dart |
| index 9a89b764845616d52ad92ffe35386fd396d7b40e..f306aa7e3c4b34f1856263473bccdf12a614e61b 100644 |
| --- a/lib/compiler/implementation/dart_backend/backend.dart |
| +++ b/lib/compiler/implementation/dart_backend/backend.dart |
| @@ -48,7 +48,24 @@ class DartBackend extends Backend { |
| if (!element.isTopLevel()) { |
| bailout('Cannot process non top-level $element'); |
| } |
| - sb.add(element.parseNode(compiler).unparse()); |
| + |
| + if (element.isField()) { |
| + // Add modifiers first. |
| + sb.add(element.modifiers.toString()); |
| + sb.add(' '); |
| + // Figure out type. |
| + if (element is VariableElement) { |
| + VariableListElement variables = element.variables; |
| + if (variables.type !== null) { |
| + sb.add(variables.type); |
| + sb.add(' '); |
| + } |
| + } |
| + sb.add(element.parseNode(compiler).unparse()); |
|
Anton Muhin
2012/07/06 13:55:48
do we want to resort to node unparse? It might be
Roman
2012/07/09 12:26:00
Done.
|
| + sb.add(';'); |
| + } else { |
| + sb.add(element.parseNode(compiler).unparse()); |
| + } |
| }); |
| compiler.assembledCode = sb.toString(); |
| } catch (BailoutException e) { |