zaach/jison-lex — pull request #11 by RubenVerborgh (2014-08-18 17:48:47+00:00)
Title: Simplify simple return statements.

I noticed a lexer of mine had a lot of the following generated code:
```
switch($avoiding_name_collisions) {
case 0:/* ignore */
case 1:return 13
break;
case 2:return 16
break;
case 3:return 25
break;
case 4:return 278
break;
case 5:return 279
break;
// …
case 120:console.log(yy_.yytext);
break;
}
```

**This pull requests simplifies this generated code into:**
```
switch($avoiding_name_collisions) {
case 0:/* ignore */
break;
case 120:console.log(yy_.yytext);
break;
default:
return $case_helper[$avoiding_name_collisions]
}
```