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 unittest.backend.platform_selector.scanner; | 5 library test.backend.platform_selector.scanner; |
6 | 6 |
7 import 'package:string_scanner/string_scanner.dart'; | 7 import 'package:string_scanner/string_scanner.dart'; |
8 | 8 |
9 import 'token.dart'; | 9 import 'token.dart'; |
10 | 10 |
11 /// A regular expression matching both whitespace and single-line comments. | 11 /// A regular expression matching both whitespace and single-line comments. |
12 /// | 12 /// |
13 /// This will only match if consumes at least one character. | 13 /// This will only match if consumes at least one character. |
14 final _whitespaceAndSingleLineComments = | 14 final _whitespaceAndSingleLineComments = |
15 new RegExp(r"([ \t\n]+|//[^\n]*(\n|$))+"); | 15 new RegExp(r"([ \t\n]+|//[^\n]*(\n|$))+"); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 if (!_scanner.scan("/*")) return false; | 144 if (!_scanner.scan("/*")) return false; |
145 | 145 |
146 while (_scanner.scan(_multiLineCommentBody) || _multiLineComment()) { | 146 while (_scanner.scan(_multiLineCommentBody) || _multiLineComment()) { |
147 // Do nothing. | 147 // Do nothing. |
148 } | 148 } |
149 _scanner.expect("*/"); | 149 _scanner.expect("*/"); |
150 | 150 |
151 return true; | 151 return true; |
152 } | 152 } |
153 } | 153 } |
OLD | NEW |