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

Unified Diff: lib/compiler/implementation/lib/string_helper.dart

Issue 10970038: Convert raw strings in compiler (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/compiler/implementation/lib/regexp_helper.dart ('k') | lib/compiler/implementation/native_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/string_helper.dart
===================================================================
--- lib/compiler/implementation/lib/string_helper.dart (revision 12782)
+++ lib/compiler/implementation/lib/string_helper.dart (working copy)
@@ -72,8 +72,8 @@
// The JavaScript String.replace method recognizes replacement
// patterns in the replacement string. Dart does not have that
// behavior.
- to = JS('String', @"#.replace('$', '$$$$')", to);
- return JS('String', @'#.replace(#, #)', receiver, replacer, to);
+ to = JS('String', r"#.replace('$', '$$$$')", to);
+ return JS('String', r'#.replace(#, #)', receiver, replacer, to);
}
stringReplaceAllUnchecked(receiver, from, to) {
@@ -93,9 +93,9 @@
}
} else {
RegExp quoteRegExp =
- const JSSyntaxRegExp(@'[-[\]{}()*+?.,\\^$|#\s]');
+ const JSSyntaxRegExp(r'[-[\]{}()*+?.,\\^$|#\s]');
var quoter = regExpMakeNative(quoteRegExp, global: true);
- var quoted = JS('String', @'#.replace(#, "\\$&")', from, quoter);
+ var quoted = JS('String', r'#.replace(#, "\\$&")', from, quoter);
RegExp replaceRegExp = new JSSyntaxRegExp(quoted);
var replacer = regExpMakeNative(replaceRegExp, global: true);
return stringReplaceJS(receiver, replacer, to);
@@ -125,15 +125,15 @@
stringSplitUnchecked(receiver, pattern) {
if (pattern is String) {
- return JS('List', @'#.split(#)', receiver, pattern);
+ return JS('List', r'#.split(#)', receiver, pattern);
} else if (pattern is JSSyntaxRegExp) {
var re = regExpGetNative(pattern);
- return JS('List', @'#.split(#)', receiver, re);
+ return JS('List', r'#.split(#)', receiver, re);
} else {
throw "StringImplementation.split(Pattern) UNIMPLEMENTED";
}
}
stringJoinUnchecked(array, separator) {
- return JS('String', @'#.join(#)', array, separator);
+ return JS('String', r'#.join(#)', array, separator);
}
« no previous file with comments | « lib/compiler/implementation/lib/regexp_helper.dart ('k') | lib/compiler/implementation/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698