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

Unified Diff: pkg/analysis_services/lib/src/correction/source_range.dart

Issue 484733003: Import analysis_services.dart into analysis_server.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_services/lib/src/correction/source_range.dart
diff --git a/pkg/analysis_services/lib/src/correction/source_range.dart b/pkg/analysis_services/lib/src/correction/source_range.dart
deleted file mode 100644
index 9ed3438ff8d579784cd684c1ea4398f495137f2c..0000000000000000000000000000000000000000
--- a/pkg/analysis_services/lib/src/correction/source_range.dart
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library services.src.correction.source_range_factory;
-
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/element.dart';
-import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/scanner.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-
-SourceRange rangeElementName(Element element) {
- return new SourceRange(element.nameOffset, element.displayName.length);
-}
-
-SourceRange rangeEndEnd(a, b) {
- int offset = a.end;
- var length = b.end - offset;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeEndLength(a, int length) {
- int offset = a is int ? a : a.end;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeEndStart(a, b) {
- int offset = a.end;
- var length = (b is int ? b : b.offset) - offset;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeError(AnalysisError error) {
- return new SourceRange(error.offset, error.length);
-}
-
-SourceRange rangeNode(AstNode node) {
- return new SourceRange(node.offset, node.length);
-}
-
-SourceRange rangeNodes(List<AstNode> nodes) {
- if (nodes.isEmpty) {
- return new SourceRange(0, 0);
- }
- AstNode first = nodes.first;
- AstNode last = nodes.last;
- return rangeStartEnd(first, last);
-}
-
-SourceRange rangeOffsetEnd(o) {
- int offset = o.offset;
- int length = o.end - offset;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeStartEnd(a, b) {
- int offset = a is int ? a : a.offset;
- int end = b is int ? b : b.end;
- var length = end - offset;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeStartLength(a, int length) {
- int offset = a is int ? a : a.offset;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeStartStart(a, b) {
- int offset = a is int ? a : a.offset;
- var length = (b is int ? b : b.offset) - offset;
- return new SourceRange(offset, length);
-}
-
-SourceRange rangeToken(Token token) {
- return new SourceRange(token.offset, token.length);
-}

Powered by Google App Engine
This is Rietveld 408576698