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

Unified Diff: tools/testing/dart/status_expression.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/status_expression.dart
diff --git a/tools/testing/dart/status_expression.dart b/tools/testing/dart/status_expression.dart
index f5191fb9a83a96f25239b6dd4044097790c7d7d3..e49dc6cbf462762fa8f4f023c6d6c1a47be1092f 100644
--- a/tools/testing/dart/status_expression.dart
+++ b/tools/testing/dart/status_expression.dart
@@ -50,9 +50,9 @@ class Tokenizer {
: tokens = new List<String>();
// Tokens are : "(", ")", "$", ",", "&&", "||", "==", and (maximal) \w+.
- static final testRegexp =
- new RegExp(r"^([()$\w\s,]|(\&\&)|(\|\|)|(\=\=))+$");
- static final regexp = new RegExp(r"[()$,]|(\&\&)|(\|\|)|(\=\=)|\w+");
+ static const testRegexp =
+ const RegExp(r"^([()$\w\s,]|(\&\&)|(\|\|)|(\=\=))+$");
+ static const regexp = const RegExp(r"[()$,]|(\&\&)|(\|\|)|(\=\=)|\w+");
List<String> tokenize() {
if (!testRegexp.hasMatch(expression)) {
@@ -234,7 +234,7 @@ class ExpressionParser {
scanner.advance();
return value;
}
- Expect.isTrue(new RegExp(r"^\w+$").hasMatch(scanner.current),
+ Expect.isTrue(const RegExp(r"^\w+$").hasMatch(scanner.current),
"Expected identifier in expression, got ${scanner.current}");
SetExpression value = new SetConstant(scanner.current);
scanner.advance();
@@ -278,13 +278,13 @@ class ExpressionParser {
Expect.equals(scanner.current, Token.DOLLAR_SYMBOL,
"Expected \$ in expression, got ${scanner.current}");
scanner.advance();
- Expect.isTrue(new RegExp(r"^\w+$").hasMatch(scanner.current),
+ Expect.isTrue(const RegExp(r"^\w+$").hasMatch(scanner.current),
"Expected identifier in expression, got ${scanner.current}");
TermVariable left = new TermVariable(scanner.current);
scanner.advance();
if (scanner.current == Token.EQUALS) {
scanner.advance();
- Expect.isTrue(new RegExp(r"^\w+$").hasMatch(scanner.current),
+ Expect.isTrue(const RegExp(r"^\w+$").hasMatch(scanner.current),
"Expected identifier in expression, got ${scanner.current}");
TermConstant right = new TermConstant(scanner.current);
scanner.advance();
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698