| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library codegen.protocol; | 5 library codegen.protocol; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'api.dart'; | 9 import 'api.dart'; |
| 10 import 'codegen_tools.dart'; | 10 import 'codegen_tools.dart'; |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 writeln('suggestions.add(suggestion);'); | 556 writeln('suggestions.add(suggestion);'); |
| 557 }); | 557 }); |
| 558 writeln('}'); | 558 writeln('}'); |
| 559 return true; | 559 return true; |
| 560 case 'SourceChange': | 560 case 'SourceChange': |
| 561 docComment( | 561 docComment( |
| 562 [new dom.Text('Adds [edit] to the [FileEdit] for the given [file].')
]); | 562 [new dom.Text('Adds [edit] to the [FileEdit] for the given [file].')
]); |
| 563 writeln('void addEdit(String file, int fileStamp, SourceEdit edit) =>'); | 563 writeln('void addEdit(String file, int fileStamp, SourceEdit edit) =>'); |
| 564 writeln(' _addEditToSourceChange(this, file, fileStamp, edit);'); | 564 writeln(' _addEditToSourceChange(this, file, fileStamp, edit);'); |
| 565 writeln(); | 565 writeln(); |
| 566 docComment( |
| 567 [new dom.Text('Adds [edit] to the [FileEdit] for the given [source].
')]); |
| 568 writeln('void addSourceEdit(engine.AnalysisContext context,'); |
| 569 writeln( 'engine.Source source, SourceEdit edit) =>'); |
| 570 writeln(' _addSourceEditToSourceChange(this, context, source, edit);'
); |
| 571 writeln(); |
| 572 docComment( |
| 573 [new dom.Text('Adds [edit] to the [FileEdit] for the given [element]
.')]); |
| 574 writeln('void addElementEdit(engine.Element element, SourceEdit edit) =>
'); |
| 575 writeln(' _addElementEditToSourceChange(this, element, edit);'); |
| 576 writeln(); |
| 566 docComment([new dom.Text('Adds the given [FileEdit].')]); | 577 docComment([new dom.Text('Adds the given [FileEdit].')]); |
| 567 writeln('void addFileEdit(SourceFileEdit edit) {'); | 578 writeln('void addFileEdit(SourceFileEdit edit) {'); |
| 568 indent(() { | 579 indent(() { |
| 569 writeln('edits.add(edit);'); | 580 writeln('edits.add(edit);'); |
| 570 }); | 581 }); |
| 571 writeln('}'); | 582 writeln('}'); |
| 572 writeln(); | 583 writeln(); |
| 573 docComment([new dom.Text('Adds the given [LinkedEditGroup].')]); | 584 docComment([new dom.Text('Adds the given [LinkedEditGroup].')]); |
| 574 writeln('void addLinkedEditGroup(LinkedEditGroup linkedEditGroup) {'); | 585 writeln('void addLinkedEditGroup(LinkedEditGroup linkedEditGroup) {'); |
| 575 indent(() { | 586 indent(() { |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 CodegenProtocolVisitor visitor = new CodegenProtocolVisitor(readApi()); | 1314 CodegenProtocolVisitor visitor = new CodegenProtocolVisitor(readApi()); |
| 1304 return visitor.collectCode(visitor.visitApi); | 1315 return visitor.collectCode(visitor.visitApi); |
| 1305 }); | 1316 }); |
| 1306 | 1317 |
| 1307 /** | 1318 /** |
| 1308 * Translate spec_input.html into protocol_matchers.dart. | 1319 * Translate spec_input.html into protocol_matchers.dart. |
| 1309 */ | 1320 */ |
| 1310 main() { | 1321 main() { |
| 1311 target.generate(); | 1322 target.generate(); |
| 1312 } | 1323 } |
| OLD | NEW |