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

Side by Side Diff: pkg/analyzer/lib/src/services/formatter_impl.dart

Issue 264473002: Support for new 'deferred' import declaration modifier. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « no previous file | pkg/analyzer/test/services/data/cu_tests.data » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 formatter_impl; 5 library formatter_impl;
6 6
7 import 'dart:math'; 7 import 'dart:math';
8 8
9 import 'package:analyzer/analyzer.dart'; 9 import 'package:analyzer/analyzer.dart';
10 import 'package:analyzer/src/generated/parser.dart'; 10 import 'package:analyzer/src/generated/parser.dart';
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 token(node.keyword); 939 token(node.keyword);
940 space(); 940 space();
941 visitCommaSeparatedNodes(node.interfaces); 941 visitCommaSeparatedNodes(node.interfaces);
942 } 942 }
943 943
944 visitImportDirective(ImportDirective node) { 944 visitImportDirective(ImportDirective node) {
945 visitDirectiveMetadata(node.metadata); 945 visitDirectiveMetadata(node.metadata);
946 token(node.keyword); 946 token(node.keyword);
947 nonBreakingSpace(); 947 nonBreakingSpace();
948 visit(node.uri); 948 visit(node.uri);
949 token(node.deferredToken, precededBy: space);
949 token(node.asToken, precededBy: space, followedBy: space); 950 token(node.asToken, precededBy: space, followedBy: space);
950 allowContinuedLines((){ 951 allowContinuedLines((){
951 visit(node.prefix); 952 visit(node.prefix);
952 visitNodes(node.combinators, precededBy: space, separatedBy: space); 953 visitNodes(node.combinators, precededBy: space, separatedBy: space);
953 }); 954 });
954 token(node.semicolon); 955 token(node.semicolon);
955 } 956 }
956 957
957 visitIndexExpression(IndexExpression node) { 958 visitIndexExpression(IndexExpression node) {
958 if (node.isCascaded) { 959 if (node.isCascaded) {
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 var lastLine = 1773 var lastLine =
1773 lineInfo.getLocation(lastOffset).lineNumber; 1774 lineInfo.getLocation(lastOffset).lineNumber;
1774 var currentLine = 1775 var currentLine =
1775 lineInfo.getLocation(currentOffset).lineNumber; 1776 lineInfo.getLocation(currentOffset).lineNumber;
1776 return currentLine - lastLine; 1777 return currentLine - lastLine;
1777 } 1778 }
1778 1779
1779 String toString() => writer.toString(); 1780 String toString() => writer.toString();
1780 1781
1781 } 1782 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/services/data/cu_tests.data » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698