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; |