| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.sdk.io; | 4 library engine.sdk.io; |
| 5 | 5 |
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
| 7 import 'java_io.dart'; | 7 import 'java_io.dart'; |
| 8 import 'java_engine_io.dart'; | 8 import 'java_engine_io.dart'; |
| 9 import 'source_io.dart'; | 9 import 'source_io.dart'; |
| 10 import 'error.dart'; | 10 import 'error.dart'; |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 * platforms: 0), | 443 * platforms: 0), |
| 444 * }; | 444 * }; |
| 445 * </pre> | 445 * </pre> |
| 446 * | 446 * |
| 447 * @coverage dart.engine.sdk | 447 * @coverage dart.engine.sdk |
| 448 */ | 448 */ |
| 449 class SdkLibrariesReader { | 449 class SdkLibrariesReader { |
| 450 /** | 450 /** |
| 451 * Return the library map read from the given source. | 451 * Return the library map read from the given source. |
| 452 * | 452 * |
| 453 * @param file the [File] of the library file |
| 454 * @param libraryFileContents the contents from the library file |
| 453 * @return the library map read from the given source | 455 * @return the library map read from the given source |
| 454 */ | 456 */ |
| 455 LibraryMap readFrom(JavaFile librariesFile, String libraryFileContents) { | 457 LibraryMap readFrom(JavaFile file, String libraryFileContents) => readFrom2(ne
w FileBasedSource.con2(null, file, UriKind.FILE_URI), libraryFileContents); |
| 458 |
| 459 /** |
| 460 * Return the library map read from the given source. |
| 461 * |
| 462 * @param source the source of the library file |
| 463 * @param libraryFileContents the contents from the library file |
| 464 * @return the library map read from the given source |
| 465 */ |
| 466 LibraryMap readFrom2(Source source, String libraryFileContents) { |
| 456 BooleanErrorListener errorListener = new BooleanErrorListener(); | 467 BooleanErrorListener errorListener = new BooleanErrorListener(); |
| 457 Source source = new FileBasedSource.con2(null, librariesFile, UriKind.FILE_U
RI); | |
| 458 Scanner scanner = new Scanner(source, new CharSequenceReader(new CharSequenc
e(libraryFileContents)), errorListener); | 468 Scanner scanner = new Scanner(source, new CharSequenceReader(new CharSequenc
e(libraryFileContents)), errorListener); |
| 459 Parser parser = new Parser(source, errorListener); | 469 Parser parser = new Parser(source, errorListener); |
| 460 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); | 470 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); |
| 461 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(); | 471 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(); |
| 462 if (!errorListener.errorReported) { | 472 if (!errorListener.errorReported) { |
| 463 unit.accept(libraryBuilder); | 473 unit.accept(libraryBuilder); |
| 464 } | 474 } |
| 465 return libraryBuilder.librariesMap; | 475 return libraryBuilder.librariesMap; |
| 466 } | 476 } |
| 467 } | 477 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 } | 549 } |
| 540 } | 550 } |
| 541 } | 551 } |
| 542 } | 552 } |
| 543 } | 553 } |
| 544 librariesMap.setLibrary(libraryName, library); | 554 librariesMap.setLibrary(libraryName, library); |
| 545 } | 555 } |
| 546 return null; | 556 return null; |
| 547 } | 557 } |
| 548 } | 558 } |
| OLD | NEW |