Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Unified Diff: lib/src/backend/platform_selector/token.dart

Issue 1717483002: Make PlatformSelector use boolean_selector. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/backend/platform_selector/scanner.dart ('k') | lib/src/backend/platform_selector/visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/platform_selector/token.dart
diff --git a/lib/src/backend/platform_selector/token.dart b/lib/src/backend/platform_selector/token.dart
deleted file mode 100644
index 759999f5523d03d065cf819e7a7e29617299e927..0000000000000000000000000000000000000000
--- a/lib/src/backend/platform_selector/token.dart
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:source_span/source_span.dart';
-
-/// A token in a platform selector.
-class Token {
- /// The type of the token.
- final TokenType type;
-
- /// The span indicating where this token came from.
- ///
- /// This is a [FileSpan] because the tokens are parsed from a single
- /// continuous string, but the string itself isn't actually a file. It might
- /// come from a statically-parsed annotation or from a parameter.
- final FileSpan span;
-
- Token(this.type, this.span);
-}
-
-/// A token representing an identifier.
-class IdentifierToken implements Token {
- final type = TokenType.identifier;
- final FileSpan span;
-
- /// The name of the identifier.
- final String name;
-
- IdentifierToken(this.name, this.span);
-
- String toString() => 'identifier "$name"';
-}
-
-/// An enumeration of types of tokens.
-class TokenType {
- /// A `(` character.
- static const leftParen = const TokenType._("left paren");
-
- /// A `)` character.
- static const rightParen = const TokenType._("right paren");
-
- /// A `||` sequence.
- static const or = const TokenType._("or");
-
- /// A `&&` sequence.
- static const and = const TokenType._("and");
-
- /// A `!` character.
- static const not = const TokenType._("not");
-
- /// A `?` character.
- static const questionMark = const TokenType._("question mark");
-
- /// A `:` character.
- static const colon = const TokenType._("colon");
-
- /// A named identifier.
- static const identifier = const TokenType._("identifier");
-
- /// The end of the selector.
- static const endOfFile = const TokenType._("end of file");
-
- /// The name of the token type.
- final String name;
-
- const TokenType._(this.name);
-
- String toString() => name;
-}
« no previous file with comments | « lib/src/backend/platform_selector/scanner.dart ('k') | lib/src/backend/platform_selector/visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698