qfox/ZeParser — Issue #6: Duplicate `default` clauses in `switch` statements
Author: kitcambridge
Created: 2011-12-22 23:30:26+00:00
State: open

`ZeParser.parse('switch({}){default: console.log("Yes");break;default: console.log("Yes");break;}', true);` shouldn't parse correctly, but instead returns an array of 31 tokens. I believe [line 1476](https://github.com/qfox/ZeParser/blob/master/ZeParser.js#L1476) should be changed to read:

```js
while (match.value == 'case' || !stack.parsedSwitchDefault &&
(stack.parsedSwitchDefault = match.value == 'default')) {
```

(I didn't submit a pull request in case I misinterpreted your code...but I can certainly do so if you can confirm that this is, indeed, the correct fix).