OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 scanner.utf8_bytes_scanner; | 5 library dart_scanner.utf8_bytes_scanner; |
6 | 6 |
7 import 'dart:convert' show | 7 import 'dart:convert' show |
8 UNICODE_BOM_CHARACTER_RUNE, | 8 UNICODE_BOM_CHARACTER_RUNE, |
9 UTF8; | 9 UTF8; |
10 | 10 |
11 import 'precedence.dart' show | 11 import 'precedence.dart' show |
12 PrecedenceInfo; | 12 PrecedenceInfo; |
13 | 13 |
14 import 'token.dart' show | 14 import 'token.dart' show |
15 StringToken, | 15 StringToken, |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly, | 198 void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly, |
199 [int extraOffset = 0]) { | 199 [int extraOffset = 0]) { |
200 tail.next = new StringToken.fromUtf8Bytes( | 200 tail.next = new StringToken.fromUtf8Bytes( |
201 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart); | 201 info, bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart); |
202 tail = tail.next; | 202 tail = tail.next; |
203 } | 203 } |
204 | 204 |
205 bool atEndOfFile() => byteOffset >= bytes.length - 1; | 205 bool atEndOfFile() => byteOffset >= bytes.length - 1; |
206 } | 206 } |
OLD | NEW |