| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 dart2js.scanner.string_scanner; | 5 library dart2js.scanner.string_scanner; |
| 6 | 6 |
| 7 import 'array_based_scanner.dart' show ArrayBasedScanner; | 7 import 'array_based_scanner.dart' show ArrayBasedScanner; |
| 8 | 8 |
| 9 import 'precedence.dart' show PrecedenceInfo; | 9 import 'precedence.dart' show PrecedenceInfo; |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 int advance() => string.codeUnitAt(++scanOffset); | 35 int advance() => string.codeUnitAt(++scanOffset); |
| 36 int peek() => string.codeUnitAt(scanOffset + 1); | 36 int peek() => string.codeUnitAt(scanOffset + 1); |
| 37 | 37 |
| 38 int get stringOffset => scanOffset; | 38 int get stringOffset => scanOffset; |
| 39 | 39 |
| 40 int currentAsUnicode(int next) => next; | 40 int currentAsUnicode(int next) => next; |
| 41 | 41 |
| 42 void handleUnicode(int startScanOffset) {} | 42 void handleUnicode(int startScanOffset) {} |
| 43 | 43 |
| 44 Token firstToken() => tokens.next; | |
| 45 Token previousToken() => tail; | |
| 46 | |
| 47 @override | 44 @override |
| 48 StringToken createSubstringToken( | 45 StringToken createSubstringToken( |
| 49 PrecedenceInfo info, int start, bool asciiOnly, | 46 PrecedenceInfo info, int start, bool asciiOnly, |
| 50 [int extraOffset = 0]) { | 47 [int extraOffset = 0]) { |
| 51 return new StringToken.fromSubstring( | 48 return new StringToken.fromSubstring( |
| 52 info, string, start, scanOffset + extraOffset, tokenStart, | 49 info, string, start, scanOffset + extraOffset, tokenStart, |
| 53 canonicalize: true); | 50 canonicalize: true); |
| 54 } | 51 } |
| 55 | 52 |
| 56 bool atEndOfFile() => scanOffset >= string.length - 1; | 53 bool atEndOfFile() => scanOffset >= string.length - 1; |
| 57 } | 54 } |
| OLD | NEW |