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

Unified Diff: lib/compiler/implementation/lib/regexp_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/math_patch.dart ('k') | lib/compiler/implementation/lib/string_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/regexp_helper.dart
===================================================================
--- lib/compiler/implementation/lib/regexp_helper.dart (revision 12782)
+++ lib/compiler/implementation/lib/regexp_helper.dart (working copy)
@@ -4,26 +4,26 @@
List regExpExec(JSSyntaxRegExp regExp, String str) {
var nativeRegExp = regExpGetNative(regExp);
- var result = JS('List', @'#.exec(#)', nativeRegExp, str);
- if (JS('bool', @'# === null', result)) return null;
+ var result = JS('List', r'#.exec(#)', nativeRegExp, str);
+ if (JS('bool', r'# === null', result)) return null;
return result;
}
bool regExpTest(JSSyntaxRegExp regExp, String str) {
var nativeRegExp = regExpGetNative(regExp);
- return JS('bool', @'#.test(#)', nativeRegExp, str);
+ return JS('bool', r'#.test(#)', nativeRegExp, str);
}
regExpGetNative(JSSyntaxRegExp regExp) {
- var r = JS('var', @'#._re', regExp);
+ var r = JS('var', r'#._re', regExp);
if (r === null) {
- r = JS('var', @'#._re = #', regExp, regExpMakeNative(regExp));
+ r = JS('var', r'#._re = #', regExp, regExpMakeNative(regExp));
}
return r;
}
regExpAttachGlobalNative(JSSyntaxRegExp regExp) {
- JS('var', @'#._re = #', regExp, regExpMakeNative(regExp, global: true));
+ JS('var', r'#._re = #', regExp, regExpMakeNative(regExp, global: true));
}
regExpMakeNative(JSSyntaxRegExp regExp, [bool global = false]) {
@@ -36,11 +36,11 @@
if (ignoreCase) sb.add('i');
if (global) sb.add('g');
try {
- return JS('Object', @'new RegExp(#, #)', pattern, sb.toString());
+ return JS('Object', r'new RegExp(#, #)', pattern, sb.toString());
} catch (e) {
throw new IllegalJSRegExpException(pattern,
- JS('String', @'String(#)', e));
+ JS('String', r'String(#)', e));
}
}
-int regExpMatchStart(m) => JS('int', @'#.index', m);
+int regExpMatchStart(m) => JS('int', r'#.index', m);
« no previous file with comments | « lib/compiler/implementation/lib/math_patch.dart ('k') | lib/compiler/implementation/lib/string_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698