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

Unified Diff: pkg/front_end/lib/source_span.dart

Issue 2417043003: Initial API for the Dart front_end package. (Closed)
Patch Set: Created 4 years, 2 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
« pkg/front_end/lib/compiler_api.dart ('K') | « pkg/front_end/lib/compiler_api.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/source_span.dart
diff --git a/pkg/front_end/lib/source_span.dart b/pkg/front_end/lib/source_span.dart
new file mode 100644
index 0000000000000000000000000000000000000000..502504e9cc5696d02497611f034ed809628ad36a
--- /dev/null
+++ b/pkg/front_end/lib/source_span.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2016, 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.
+
+/// Defines the API for the front end to communicate information about source
+/// code locations to clients.
+library front_end.source_location;
Brian Wilkerson 2016/10/13 23:37:02 If we're going to model source information differe
Paul Berry 2016/10/14 00:09:36 I don't know. I will investigate that package.
+
+/// A location in an input source file, possibly spanning several characters.
+class SourceSpan {
Siggi Cherem (dart-lang) 2016/10/13 23:22:16 it would be great if we could use SourceSpan from
Paul Berry 2016/10/14 00:09:36 Acknowledged. I will investigate that package.
+ /// The Uri of the source file.
+ Uri get sourceUri;
Brian Wilkerson 2016/10/13 23:37:02 I would suggest 'uri'; I think it's clear that thi
Paul Berry 2016/10/14 00:09:36 Fair enough.
+
+ /// The character offset from the beginning of the source file to the start of
+ /// the span.
+ int get offset;
+
+ /// The number of characters encompassed by the span.
+ int get length;
+
+ /// The line number of the start of the span (one-based).
+ int get startLine;
+
+ /// The character position of the start of the span (zero-based).
+ int get startChar;
Brian Wilkerson 2016/10/13 23:37:02 I would suggest 'startColumn' (and 'endColumn') as
Paul Berry 2016/10/14 00:09:36 Sounds reasonable.
+
+ /// The line number of the end of the span (one-based).
+ int get endLine;
+
+ /// The character position of the end of the span (zero-based).
+ int get endChar;
+}
« pkg/front_end/lib/compiler_api.dart ('K') | « pkg/front_end/lib/compiler_api.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698