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

Unified Diff: pkg/source_maps/lib/span.dart

Issue 402843003: Deprecate the source_maps span classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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/source_maps/lib/span.dart
diff --git a/pkg/source_maps/lib/span.dart b/pkg/source_maps/lib/span.dart
index 771e9e0efa2804c58d93de49353902362d09fadc..efaff036554d5fd82ef81ed8646444cc7029ec29 100644
--- a/pkg/source_maps/lib/span.dart
+++ b/pkg/source_maps/lib/span.dart
@@ -12,6 +12,7 @@ import 'package:path/path.dart' as p;
import 'src/utils.dart';
/// A simple class that describe a segment of source text.
+@Deprecated("Use the source_span package instead.")
abstract class Span implements Comparable {
/// The start location of this span.
final Location start;
@@ -79,6 +80,7 @@ abstract class Span implements Comparable {
}
/// A location in the source text
+@Deprecated("Use the source_span package instead.")
abstract class Location implements Comparable {
/// Url of the source containing this span.
String get sourceUrl;
@@ -113,6 +115,7 @@ abstract class Location implements Comparable {
}
/// Implementation of [Location] with fixed values given at allocation time.
+@Deprecated("Use the source_span package instead.")
class FixedLocation extends Location {
final String sourceUrl;
final int line;
@@ -123,6 +126,7 @@ class FixedLocation extends Location {
}
/// Implementation of [Span] where all the values are given at allocation time.
+@Deprecated("Use the source_span package instead.")
class FixedSpan extends Span {
/// The source text for this span, if available.
final String text;
@@ -137,6 +141,7 @@ class FixedSpan extends Span {
}
/// [Location] with values computed from an underling [SourceFile].
+@Deprecated("Use the source_span package instead.")
class FileLocation extends Location {
/// The source file containing this location.
final SourceFile file;
@@ -149,6 +154,7 @@ class FileLocation extends Location {
}
/// [Span] where values are computed from an underling [SourceFile].
+@Deprecated("Use the source_span package instead.")
class FileSpan extends Span {
/// The source file containing this span.
final SourceFile file;
@@ -195,6 +201,7 @@ const String _NO_COLOR = '\u001b[0m';
/// Stores information about a source file, to permit computation of the line
/// and column. Also contains a nice default error message highlighting the code
/// location.
+@Deprecated("Use the source_span package instead.")
class SourceFile {
/// Url where the source file is located.
final String url;
@@ -306,6 +313,7 @@ class SourceFile {
/// allows you to set source-map locations based on the locations relative to
/// the start of the segment, but that get translated to absolute locations in
/// the original source file.
+@Deprecated("Use the source_span package instead.")
class SourceFileSegment extends SourceFile {
final int _baseOffset;
final int _baseLine;
@@ -365,6 +373,7 @@ class SourceFileSegment extends SourceFile {
}
/// A class for exceptions that have source span information attached.
+@Deprecated("Use the source_span package instead.")
class SpanException implements Exception {
/// A message describing the exception.
final String message;
@@ -384,6 +393,7 @@ class SpanException implements Exception {
}
/// A [SpanException] that's also a [FormatException].
+@Deprecated("Use the source_span package instead.")
class SpanFormatException extends SpanException implements FormatException {
SpanFormatException(String message, Span span)
: super(message, span);

Powered by Google App Engine
This is Rietveld 408576698