defunkt/coffee-mode — Issue #66: Freeze when '/' is followed by lots of brackets
Author: imofftoseethewizard
Created: 2012-01-30 06:05:59+00:00
State: open

The following bit will cause coffee-mode to freeze mid-display

hPI = Math.PI/2
for v in [ [ -1, 2], [ 1, 2], [ 1, 0], [ -1, 0],
[ PI-1, 2], [ PI+1, 2], [ PI+1, 0], [ PI-1, 0],
[ -1, 3], [ 1, 3], [ 1, 1], [ -1, 1],
[hPI-1, 3], [hPI+1, 3], [hPI+1, 1], [hPI-1, 1],
[ PI-1, 3], [ PI+1, 3], [ PI+1, 1], [ PI-1, 1] ]
false

but neither

hPI = Math.PI/2 # /
for v in [ [ -1, 2], [ 1, 2], [ 1, 0], [ -1, 0],
[ PI-1, 2], [ PI+1, 2], [ PI+1, 0], [ PI-1, 0],
[ -1, 3], [ 1, 3], [ 1, 1], [ -1, 1],
[hPI-1, 3], [hPI+1, 3], [hPI+1, 1], [hPI-1, 1],
[ PI-1, 3], [ PI+1, 3], [ PI+1, 1], [ PI-1, 1] ]
false

nor

hPI = Math.PI/2
for v in [ [ -1, 2], [ 1, 2], [ 1, 0], [ -1, 0],
[ PI-1, 3], [ PI+1, 3], [ PI+1, 1], [ PI-1, 1] ]
false

have trouble. Seems like a regexp parsing problem.