Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: pkg/analyzer/lib/src/generated/sdk_io.dart

Issue 137863002: Issue 8742. Preserve leading line comments during java2dart translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test for block-style comment translation. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698