| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library string_scanner.eager_span_scanner; | |
| 6 | |
| 7 import 'package:charcode/ascii.dart'; | 5 import 'package:charcode/ascii.dart'; |
| 8 | 6 |
| 9 import 'line_scanner.dart'; | 7 import 'line_scanner.dart'; |
| 10 import 'span_scanner.dart'; | 8 import 'span_scanner.dart'; |
| 11 | 9 |
| 12 // TODO(nweiz): Currently this duplicates code in line_scanner.dart. Once | 10 // TODO(nweiz): Currently this duplicates code in line_scanner.dart. Once |
| 13 // sdk#23770 is fully complete, we should move the shared code into a mixin. | 11 // sdk#23770 is fully complete, we should move the shared code into a mixin. |
| 14 | 12 |
| 15 /// A regular expression matching newlines across platforms. | 13 /// A regular expression matching newlines across platforms. |
| 16 final _newlineRegExp = new RegExp(r"\r\n?|\n"); | 14 final _newlineRegExp = new RegExp(r"\r\n?|\n"); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 /// A class representing the state of an [EagerSpanScanner]. | 104 /// A class representing the state of an [EagerSpanScanner]. |
| 107 class _EagerSpanScannerState implements LineScannerState { | 105 class _EagerSpanScannerState implements LineScannerState { |
| 108 final EagerSpanScanner _scanner; | 106 final EagerSpanScanner _scanner; |
| 109 final int position; | 107 final int position; |
| 110 final int line; | 108 final int line; |
| 111 final int column; | 109 final int column; |
| 112 | 110 |
| 113 _EagerSpanScannerState(this._scanner, this.position, this.line, this.column); | 111 _EagerSpanScannerState(this._scanner, this.position, this.line, this.column); |
| 114 } | 112 } |
| 115 | 113 |
| OLD | NEW |