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

Unified Diff: dart/frog/leg/lib/js_helper.dart

Issue 9423042: Copy JSSyntaxRegExp from frog. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | dart/frog/leg/lib/mockimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/lib/js_helper.dart
diff --git a/dart/frog/leg/lib/js_helper.dart b/dart/frog/leg/lib/js_helper.dart
index 6d85849d5770801e6a27b2473bbc5d0c2bd4789a..59919d74c956ac7924037936e67dc0132f509c93 100644
--- a/dart/frog/leg/lib/js_helper.dart
+++ b/dart/frog/leg/lib/js_helper.dart
@@ -7,6 +7,7 @@
#import('coreimpl.dart');
#source('date_helper.dart');
+#source('regexp_helper.dart');
/**
* Returns true if both arguments are numbers.
@@ -799,6 +800,12 @@ checkBool(value) {
return value;
}
+checkString(value) {
+ checkNull(value);
kasperl 2012/02/21 07:35:17 Would it be simpler to rewrite some of these to do
+ if (value is !String) throw new IllegalArgumentException(value);
+ return value;
+}
+
builtin$isNegative$0(receiver) {
checkNull(receiver);
if (receiver is num) {
« no previous file with comments | « no previous file | dart/frog/leg/lib/mockimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698