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

Unified Diff: test/generated_sdk/lib/core/double.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 | « test/generated_sdk/lib/core/date_time.dart ('k') | test/generated_sdk/lib/core/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/core/double.dart
diff --git a/test/generated_sdk/lib/core/double.dart b/test/generated_sdk/lib/core/double.dart
index a59cddf1bcbaec80b1550af01549a1d9badb2c6d..90bd0e4f92b40b102cd2e1320ea20f271cffc076 100644
--- a/test/generated_sdk/lib/core/double.dart
+++ b/test/generated_sdk/lib/core/double.dart
@@ -167,7 +167,40 @@ abstract class double extends num {
*/
String toString();
- @patch
+ /**
+ * Parse [source] as an double literal and return its value.
+ *
+ * Accepts an optional sign (`+` or `-`) followed by either the characters
+ * "Infinity", the characters "NaN" or a floating-point representation.
+ * A floating-point representation is composed of a mantissa and an optional
+ * exponent part. The mantissa is either a decimal point (`.`) followed by a
+ * sequence of (decimal) digits, or a sequence of digits
+ * optionally followed by a decimal point and optionally more digits. The
+ * (optional) exponent part consists of the character "e" or "E", an optional
+ * sign, and one or more digits.
+ *
+ * Leading and trailing whitespace is ignored.
+ *
+ * If the [source] is not a valid double literal, the [onError]
+ * is called with the [source] as argument, and its return value is
+ * used instead. If no `onError` is provided, a [FormatException]
+ * is thrown instead.
+ *
+ * The [onError] function is only invoked if [source] is a [String] with an
+ * invalid format. It is not invoked if the [source] is invalid for some
+ * other reason, for example by being `null`.
+ *
+ * Examples of accepted strings:
+ *
+ * "3.14"
+ * " 3.14 \xA0"
+ * "0."
+ * ".0"
+ * "-1.e3"
+ * "1234E+7"
+ * "+.12e-9"
+ * "-NaN"
+ */
static double parse(String source,
[double onError(String source)]) {
return Primitives.parseDouble(source, onError);
« no previous file with comments | « test/generated_sdk/lib/core/date_time.dart ('k') | test/generated_sdk/lib/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698