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

Unified Diff: pkg/yaml/lib/src/parser.dart

Issue 277593005: Fix analyzer warnings in the YAML package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « pkg/yaml/lib/src/deep_equals.dart ('k') | pkg/yaml/lib/src/yaml_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/yaml/lib/src/parser.dart
diff --git a/pkg/yaml/lib/src/parser.dart b/pkg/yaml/lib/src/parser.dart
index 2616038ee175b0b25020af36f9b6789618742aa9..fcf1402e7db0665d0d24b60734cde4e841709971 100644
--- a/pkg/yaml/lib/src/parser.dart
+++ b/pkg/yaml/lib/src/parser.dart
@@ -1106,13 +1106,16 @@ class Parser {
// 136
int inFlow(int ctx) {
switch (ctx) {
- case FLOW_OUT:
- case FLOW_IN:
- return FLOW_IN;
- case BLOCK_KEY:
- case FLOW_KEY:
- return FLOW_KEY;
+ case FLOW_OUT:
+ case FLOW_IN:
+ return FLOW_IN;
+ case BLOCK_KEY:
+ case FLOW_KEY:
+ return FLOW_KEY;
}
+ assert(false);
+ // Remove this return when issue 18730 is fixed.
+ return null;
Bob Nystrom 2014/05/08 21:01:04 Most other code I've seen uses: throw "unreachabl
nweiz 2014/05/08 21:18:18 Done.
}
// 137
@@ -1434,6 +1437,9 @@ class Parser {
case CHOMPING_KEEP:
return b_asLineFeed();
}
+ assert(false);
+ // Remove this return when issue 18730 is fixed.
+ return null;
}
// 166
« no previous file with comments | « pkg/yaml/lib/src/deep_equals.dart ('k') | pkg/yaml/lib/src/yaml_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698