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

Unified Diff: utils/pub/yaml/composer.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « utils/pub/version_solver.dart ('k') | utils/pub/yaml/model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/yaml/composer.dart
diff --git a/utils/pub/yaml/composer.dart b/utils/pub/yaml/composer.dart
index 79aa27411d035893bbfb4b9ecad224eb5f1aa61a..e9c187969aa9dbcb51e277c80c08e4a4d0fde813 100644
--- a/utils/pub/yaml/composer.dart
+++ b/utils/pub/yaml/composer.dart
@@ -115,7 +115,7 @@ class _Composer extends _Visitor {
var match = new RegExp("^[-+]?[0-9]+\$").firstMatch(content);
if (match != null) {
return new _ScalarNode(_Tag.yaml("int"),
- value: Math.parseInt(match.group(0)));
+ value: int.parse(match.group(0)));
}
match = new RegExp("^0o([0-7]+)\$").firstMatch(content);
@@ -132,7 +132,7 @@ class _Composer extends _Visitor {
match = new RegExp("^0x[0-9a-fA-F]+\$").firstMatch(content);
if (match != null) {
return new _ScalarNode(_Tag.yaml("int"),
- value: Math.parseInt(match.group(0)));
+ value: int.parse(match.group(0)));
}
return null;
@@ -148,20 +148,20 @@ class _Composer extends _Visitor {
// floats by removing the trailing dot.
var matchStr = match.group(0).replaceAll(new RegExp(r"\.$"), "");
return new _ScalarNode(_Tag.yaml("float"),
- value: Math.parseDouble(matchStr));
+ value: double.parse(matchStr));
}
match = new RegExp("^([+-]?)\.(inf|Inf|INF)\$").firstMatch(content);
if (match != null) {
var infinityStr = match.group(1) == "-" ? "-Infinity" : "Infinity";
return new _ScalarNode(_Tag.yaml("float"),
- value: Math.parseDouble(infinityStr));
+ value: double.parse(infinityStr));
}
match = new RegExp("^\.(nan|NaN|NAN)\$").firstMatch(content);
if (match != null) {
return new _ScalarNode(_Tag.yaml("float"),
- value: Math.parseDouble("NaN"));
+ value: double.parse("NaN"));
}
return null;
« no previous file with comments | « utils/pub/version_solver.dart ('k') | utils/pub/yaml/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698