| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:charcode/ascii.dart'; | 5 import 'package:charcode/ascii.dart'; |
| 6 import 'package:front_end/src/scanner/errors.dart'; | 6 import 'package:front_end/src/scanner/errors.dart'; |
| 7 import 'package:front_end/src/scanner/reader.dart'; | 7 import 'package:front_end/src/scanner/reader.dart'; |
| 8 import 'package:front_end/src/scanner/string_utilities.dart'; | 8 import 'package:front_end/src/scanner/string_utilities.dart'; |
| 9 import 'package:front_end/src/scanner/token.dart'; | 9 import 'package:front_end/src/scanner/token.dart'; |
| 10 | 10 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 /** | 195 /** |
| 196 * A flag indicating whether the lazy compound assignment operators '&&=' and | 196 * A flag indicating whether the lazy compound assignment operators '&&=' and |
| 197 * '||=' are enabled. | 197 * '||=' are enabled. |
| 198 */ | 198 */ |
| 199 bool scanLazyAssignmentOperators = false; | 199 bool scanLazyAssignmentOperators = false; |
| 200 | 200 |
| 201 /** | 201 /** |
| 202 * Initialize a newly created scanner to scan characters from the given | 202 * Initialize a newly created scanner to scan characters from the given |
| 203 * character [_reader]. | 203 * character [_reader]. |
| 204 */ | 204 */ |
| 205 Scanner(this._reader) { | 205 Scanner.create(this._reader) { |
| 206 _tokens = new Token(TokenType.EOF, -1); | 206 _tokens = new Token(TokenType.EOF, -1); |
| 207 _tokens.setNext(_tokens); | 207 _tokens.setNext(_tokens); |
| 208 _tail = _tokens; | 208 _tail = _tokens; |
| 209 _tokenStart = -1; | 209 _tokenStart = -1; |
| 210 _lineStarts.add(0); | 210 _lineStarts.add(0); |
| 211 } | 211 } |
| 212 | 212 |
| 213 /** | 213 /** |
| 214 * Return the first token in the token stream that was scanned. | 214 * Return the first token in the token stream that was scanned. |
| 215 */ | 215 */ |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 /** | 1334 /** |
| 1335 * Checks if [value] is a single-line or multi-line comment. | 1335 * Checks if [value] is a single-line or multi-line comment. |
| 1336 */ | 1336 */ |
| 1337 static bool _isDocumentationComment(String value) { | 1337 static bool _isDocumentationComment(String value) { |
| 1338 return StringUtilities.startsWith3(value, 0, $slash, $slash, $slash) || | 1338 return StringUtilities.startsWith3(value, 0, $slash, $slash, $slash) || |
| 1339 StringUtilities.startsWith3(value, 0, $slash, $asterisk, $asterisk); | 1339 StringUtilities.startsWith3(value, 0, $slash, $asterisk, $asterisk); |
| 1340 } | 1340 } |
| 1341 } | 1341 } |
| OLD | NEW |