| Index: lib/src/backend/platform_selector/scanner.dart
|
| diff --git a/lib/src/backend/platform_selector/scanner.dart b/lib/src/backend/platform_selector/scanner.dart
|
| index 0a79c491292e172425a70b8b04148d84993b7a67..62a6ee0c9d5121d3e281412fe3549a81ff4f5671 100644
|
| --- a/lib/src/backend/platform_selector/scanner.dart
|
| +++ b/lib/src/backend/platform_selector/scanner.dart
|
| @@ -6,6 +6,7 @@ library test.backend.platform_selector.scanner;
|
|
|
| import 'package:string_scanner/string_scanner.dart';
|
|
|
| +import '../../utils.dart';
|
| import 'token.dart';
|
|
|
| /// A regular expression matching both whitespace and single-line comments.
|
| @@ -20,12 +21,6 @@ final _whitespaceAndSingleLineComments =
|
| /// This will only match if it consumes at least one character.
|
| final _multiLineCommentBody = new RegExp(r"([^/*]|/[^*]|\*[^/])+");
|
|
|
| -/// A regular expression matching an identifier.
|
| -///
|
| -/// Unlike standard Dart identifiers, platform selector identifiers may
|
| -/// contain dashes for consistency with command-line arguments.
|
| -final _identifier = new RegExp(r"[a-zA-Z_-][a-zA-Z0-9_-]*");
|
| -
|
| /// A scanner that converts a platform selector string into a stream of
|
| /// tokens.
|
| class Scanner {
|
| @@ -124,7 +119,7 @@ class Scanner {
|
|
|
| /// Scans and returns an identifier token.
|
| Token _scanIdentifier() {
|
| - _scanner.expect(_identifier, name: "expression");
|
| + _scanner.expect(hyphenatedIdentifier, name: "expression");
|
| return new IdentifierToken(_scanner.lastMatch[0], _scanner.lastSpan);
|
| }
|
|
|
|
|