| 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 26 matching lines...) Expand all Loading... |
| 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; | 44 Token firstToken() => tokens.next; |
| 45 Token previousToken() => tail; | 45 Token previousToken() => tail; |
| 46 | 46 |
| 47 void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly, | 47 @override |
| 48 StringToken createSubstringToken( |
| 49 PrecedenceInfo info, int start, bool asciiOnly, |
| 48 [int extraOffset = 0]) { | 50 [int extraOffset = 0]) { |
| 49 tail.next = new StringToken.fromSubstring( | 51 return new StringToken.fromSubstring( |
| 50 info, string, start, scanOffset + extraOffset, tokenStart, | 52 info, string, start, scanOffset + extraOffset, tokenStart, |
| 51 canonicalize: true); | 53 canonicalize: true); |
| 52 tail = tail.next; | |
| 53 } | 54 } |
| 54 | 55 |
| 55 bool atEndOfFile() => scanOffset >= string.length - 1; | 56 bool atEndOfFile() => scanOffset >= string.length - 1; |
| 56 } | 57 } |
| OLD | NEW |