| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.sdk.io; | 8 library engine.sdk.io; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 * @param source the source of the library file | 466 * @param source the source of the library file |
| 467 * @param libraryFileContents the contents from the library file | 467 * @param libraryFileContents the contents from the library file |
| 468 * @return the library map read from the given source | 468 * @return the library map read from the given source |
| 469 */ | 469 */ |
| 470 LibraryMap readFrom2(Source source, String libraryFileContents) { | 470 LibraryMap readFrom2(Source source, String libraryFileContents) { |
| 471 BooleanErrorListener errorListener = new BooleanErrorListener(); | 471 BooleanErrorListener errorListener = new BooleanErrorListener(); |
| 472 Scanner scanner = new Scanner(source, new CharSequenceReader(new CharSequenc
e(libraryFileContents)), errorListener); | 472 Scanner scanner = new Scanner(source, new CharSequenceReader(new CharSequenc
e(libraryFileContents)), errorListener); |
| 473 Parser parser = new Parser(source, errorListener); | 473 Parser parser = new Parser(source, errorListener); |
| 474 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); | 474 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); |
| 475 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(); | 475 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(); |
| 476 // If any syntactic errors were found then don't try to visit the AST struct
ure. |
| 476 if (!errorListener.errorReported) { | 477 if (!errorListener.errorReported) { |
| 477 unit.accept(libraryBuilder); | 478 unit.accept(libraryBuilder); |
| 478 } | 479 } |
| 479 return libraryBuilder.librariesMap; | 480 return libraryBuilder.librariesMap; |
| 480 } | 481 } |
| 481 } | 482 } |
| 482 | 483 |
| 483 class SdkLibrariesReader_LibraryBuilder extends RecursiveASTVisitor<Object> { | 484 class SdkLibrariesReader_LibraryBuilder extends RecursiveASTVisitor<Object> { |
| 484 /** | 485 /** |
| 485 * The prefix added to the name of a library to form the URI used in code to r
eference the | 486 * The prefix added to the name of a library to form the URI used in code to r
eference the |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 554 } |
| 554 } | 555 } |
| 555 } | 556 } |
| 556 } | 557 } |
| 557 } | 558 } |
| 558 librariesMap.setLibrary(libraryName, library); | 559 librariesMap.setLibrary(libraryName, library); |
| 559 } | 560 } |
| 560 return null; | 561 return null; |
| 561 } | 562 } |
| 562 } | 563 } |
| OLD | NEW |