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

Side by Side Diff: pkg/analysis_server/lib/src/services/correction/source_range.dart

Issue 1527793003: Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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
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 library services.src.correction.source_range_factory; 5 library services.src.correction.source_range_factory;
6 6
7 import 'package:analyzer/dart/element/element.dart';
7 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
11 import 'package:analyzer/src/generated/source.dart'; 11 import 'package:analyzer/src/generated/source.dart';
12 12
13 SourceRange rangeElementName(Element element) { 13 SourceRange rangeElementName(Element element) {
14 return new SourceRange(element.nameOffset, element.nameLength); 14 return new SourceRange(element.nameOffset, element.nameLength);
15 } 15 }
16 16
17 SourceRange rangeEndEnd(a, b) { 17 SourceRange rangeEndEnd(a, b) {
18 int offset = a.end; 18 int offset = a.end;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 SourceRange rangeStartStart(a, b) { 78 SourceRange rangeStartStart(a, b) {
79 int offset = a is int ? a : a.offset; 79 int offset = a is int ? a : a.offset;
80 var length = (b is int ? b : b.offset) - offset; 80 var length = (b is int ? b : b.offset) - offset;
81 return new SourceRange(offset, length); 81 return new SourceRange(offset, length);
82 } 82 }
83 83
84 SourceRange rangeToken(Token token) { 84 SourceRange rangeToken(Token token) {
85 return new SourceRange(token.offset, token.length); 85 return new SourceRange(token.offset, token.length);
86 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698