Chromium Code Reviews| 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 |