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

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

Issue 10891022: Update corelib/ and lib/ to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
Index: lib/compiler/implementation/lib/regexp_helper.dart
diff --git a/lib/compiler/implementation/lib/regexp_helper.dart b/lib/compiler/implementation/lib/regexp_helper.dart
index 7227cd1ab14e2568fb2fccf3688d1573b6f2cd70..d8bc803320ceeb7b1ce90b9f2be020d755fdd5c9 100644
--- a/lib/compiler/implementation/lib/regexp_helper.dart
+++ b/lib/compiler/implementation/lib/regexp_helper.dart
@@ -19,11 +19,11 @@ regExpGetNative(JSSyntaxRegExp regExp) {
if (r === null) {
r = JS('var', @'#._re = #', regExp, regExpMakeNative(regExp));
}
- return r;
+ return r;
}
regExpAttachGlobalNative(JSSyntaxRegExp regExp) {
- JS('var', @'#._re = #', regExp, regExpMakeNative(regExp, global: true));
+ JS('var', @'#._re = #', regExp, regExpMakeNative(regExp, global: true));
}
regExpMakeNative(JSSyntaxRegExp regExp, [bool global = false]) {
@@ -37,7 +37,7 @@ regExpMakeNative(JSSyntaxRegExp regExp, [bool global = false]) {
if (global) sb.add('g');
try {
return JS('Object', @'new RegExp(#, #)', pattern, sb.toString());
- } catch (var e) {
+ } catch (e) {
throw new IllegalJSRegExpException(pattern,
JS('String', @'String(#)', e));
}
« no previous file with comments | « lib/compiler/implementation/lib/isolate_patch.dart ('k') | lib/compiler/implementation/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698