| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * This file contains code to generate serialization/deserialization logic for | 6 * This file contains code to generate serialization/deserialization logic for |
| 7 * summaries based on an "IDL" description of the summary format (written in | 7 * summaries based on an "IDL" description of the summary format (written in |
| 8 * stylized Dart). | 8 * stylized Dart). |
| 9 * | 9 * |
| 10 * For each class in the "IDL" input, two corresponding classes are generated: | 10 * For each class in the "IDL" input, two corresponding classes are generated: |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 428 |
| 429 /** | 429 /** |
| 430 * Entry point to the code generator when generating the "format.dart" file. | 430 * Entry point to the code generator when generating the "format.dart" file. |
| 431 */ | 431 */ |
| 432 void generateFormatCode() { | 432 void generateFormatCode() { |
| 433 outputHeader(); | 433 outputHeader(); |
| 434 out('library analyzer.src.summary.format;'); | 434 out('library analyzer.src.summary.format;'); |
| 435 out(); | 435 out(); |
| 436 out("import 'dart:convert' as convert;"); | 436 out("import 'dart:convert' as convert;"); |
| 437 out(); | 437 out(); |
| 438 out("import 'package:front_end/src/base/api_signature.dart' as api_sig;"); | 438 out("import 'package:analyzer/src/summary/api_signature.dart' as api_sig;"); |
| 439 out("import 'package:front_end/src/base/flat_buffers.dart' as fb;"); | 439 out("import 'package:analyzer/src/summary/flat_buffers.dart' as fb;"); |
| 440 out(); | 440 out(); |
| 441 out("import 'idl.dart' as idl;"); | 441 out("import 'idl.dart' as idl;"); |
| 442 out(); | 442 out(); |
| 443 for (idlModel.EnumDeclaration enm in _idl.enums.values) { | 443 for (idlModel.EnumDeclaration enm in _idl.enums.values) { |
| 444 _generateEnumReader(enm); | 444 _generateEnumReader(enm); |
| 445 out(); | 445 out(); |
| 446 } | 446 } |
| 447 for (idlModel.ClassDeclaration cls in _idl.classes.values) { | 447 for (idlModel.ClassDeclaration cls in _idl.classes.values) { |
| 448 _generateBuilder(cls); | 448 _generateBuilder(cls); |
| 449 out(); | 449 out(); |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 Token token = comment.tokens.first; | 1007 Token token = comment.tokens.first; |
| 1008 return token.lexeme.split('\n').map((String line) { | 1008 return token.lexeme.split('\n').map((String line) { |
| 1009 line = line.trimLeft(); | 1009 line = line.trimLeft(); |
| 1010 if (line.startsWith('*')) line = ' ' + line; | 1010 if (line.startsWith('*')) line = ' ' + line; |
| 1011 return line; | 1011 return line; |
| 1012 }).join('\n'); | 1012 }).join('\n'); |
| 1013 } | 1013 } |
| 1014 return null; | 1014 return null; |
| 1015 } | 1015 } |
| 1016 } | 1016 } |
| OLD | NEW |