jashkenas / coffee-script-tmbundle

A TextMate Bundle for CoffeeScript
MIT License
820 stars 234 forks source link

Parsing bug with slashes (/) inside brackets ([]) #154

Open daraosn opened 10 years ago

daraosn commented 10 years ago
@array = [1,2,3]
@number1 = 4
@number2 = 2
@array[@number1/@number2]
brokenStyling = true # this line won't be parsed properly

This is a dummy example, but it breaks coffeescript parsing in TextMate 2. It seems to be related to use slashes inside the array's brackets.

TextMate version 2.0-alpha.9551 OSX 10.9.4

jessbowers commented 10 years ago

This also seems to be the case with parens: ()

@number2 = 2
myfunction(@number1/@number2)
brokenStyling = true # this line won't be parsed properly
daraosn commented 10 years ago

It's actually a problem with slashes before at signs:

[@number1,@number2] = [1,2]
@number1/@number2 # breaks
@number1 /@number2 # breaks
@number1 / @number2 # ok