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

Unified Diff: lib/json/json.dart

Issue 10206022: Require a digit when parsing JSON number. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test cases. Created 8 years, 8 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 | tests/utils/src/JsonTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/json/json.dart
diff --git a/lib/json/json.dart b/lib/json/json.dart
index 07a0d4d843c7a72f60f3d733acf48ffa2f19ca13..523d3cdc2d572cb00fbae5b86b5b06f777a6d02e 100644
--- a/lib/json/json.dart
+++ b/lib/json/json.dart
@@ -282,6 +282,8 @@ class _JsonParser {
} else if (_isDigit()) {
position++;
while (_isDigit()) position++;
+ } else {
+ _error("Expected digit when parsing number");
}
bool isInt = true;
« no previous file with comments | « no previous file | tests/utils/src/JsonTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698