michaelficarra / CoffeeScriptRedux

:sweat: rewrite of the CoffeeScript compiler with proper compiler design principles and a focus on robustness and extensibility
https://michaelficarra.github.com/CoffeeScriptRedux/
BSD 3-Clause "New" or "Revised" License
1.84k stars 110 forks source link

Avoid a crash when no raw #346

Open ef4 opened 9 years ago

ef4 commented 9 years ago

You can make the compiler crash by trying to compile this file:

argv[2..-1].join()

like this:

/bin/coffee --js --input sample.coffee --source-map-file sample.map

This change defends against the missing expression.raw, since I'm inferring from the surrounding code that raw is not always present on every node.

michaelficarra commented 9 years ago

We should fix the accidentally missing raw field.