mishoo/UglifyJS — Issue #320: Differentiate between RegExp and division
Author: medikoo
Created: 2012-02-14 15:35:54+00:00
State: open

Currently Uglify doesn't differentiate properly between RegExp and division e.g. following will produce wrong AST tree:

```javascript
x = {}/1

// comment
```

```
[ 'toplevel',
[ [ 'stat',
[ 'assign', true, [ 'name', 'x' ], [ 'object', [] ] ] ],
[ 'stat',
[ 'binary',
'/',
[ 'regexp', '1;\n\n', '' ],
[ 'name', 'comment' ] ] ] ] ]
```

`/1` is parsed as start of regular expression while in that case it's division