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

Unified Diff: packages/source_span/lib/src/span_with_context.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 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
« no previous file with comments | « packages/source_span/lib/src/span_mixin.dart ('k') | packages/source_span/lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/source_span/lib/src/span_with_context.dart
diff --git a/packages/source_span/lib/src/span_with_context.dart b/packages/source_span/lib/src/span_with_context.dart
index 0012e3f3d706080c479d5d08a1d462441f713083..a02d78047575e2b85f697ba38d45248817e639be 100644
--- a/packages/source_span/lib/src/span_with_context.dart
+++ b/packages/source_span/lib/src/span_with_context.dart
@@ -2,16 +2,16 @@
// 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 source_span.span_with_context;
-
import 'location.dart';
import 'span.dart';
import 'utils.dart';
/// A class that describes a segment of source text with additional context.
class SourceSpanWithContext extends SourceSpanBase {
+ // This is a getter so that subclasses can override it.
/// Text around the span, which includes the line containing this span.
- final String context;
+ String get context => _context;
+ final String _context;
/// Creates a new span from [start] to [end] (exclusive) containing [text], in
/// the given [context].
@@ -22,7 +22,7 @@ class SourceSpanWithContext extends SourceSpanBase {
/// [text] should start at `start.column` from the beginning of a line in
/// [context].
SourceSpanWithContext(
- SourceLocation start, SourceLocation end, String text, this.context)
+ SourceLocation start, SourceLocation end, String text, this._context)
: super(start, end, text) {
if (!context.contains(text)) {
throw new ArgumentError(
« no previous file with comments | « packages/source_span/lib/src/span_mixin.dart ('k') | packages/source_span/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698