| Index: pkg/compiler/lib/src/io/line_column_provider.dart
|
| diff --git a/pkg/compiler/lib/src/io/line_column_provider.dart b/pkg/compiler/lib/src/io/line_column_provider.dart
|
| index fb3d5db513e9a41280cd97e5e8330263faca3a73..e8665fbd6b0b096564727ea2d76931939f8cf0ab 100644
|
| --- a/pkg/compiler/lib/src/io/line_column_provider.dart
|
| +++ b/pkg/compiler/lib/src/io/line_column_provider.dart
|
| @@ -13,6 +13,9 @@ abstract class LineColumnProvider {
|
|
|
| /// Returns the column number (0-based) for [offset] at the given [line].
|
| int getColumn(int line, int offset);
|
| +
|
| + /// Returns the offset for 0-based [line] and [column] numbers.
|
| + int getOffset(int line, int column);
|
| }
|
|
|
| /// [CodeOutputListener] that collects line information.
|
| @@ -65,6 +68,8 @@ class LineColumnCollector extends CodeOutputListener
|
| return offset - lineStarts[line];
|
| }
|
|
|
| + int getOffset(int line, int column) => lineStarts[line] + column;
|
| +
|
| @override
|
| void onDone(int length) {
|
| lineStarts.add(length + 1);
|
|
|