maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
727 stars 58 forks source link

Filename property in trace object is invalid for windows in some cases #64

Open yazla opened 11 years ago

yazla commented 11 years ago

Under windows the paths of file/folder is separated by '\' symbol. But '\u' is a unicode symbol start marker in javascript, so if "\u.." is not a valid unicode symbol it is an invalid expression, hence the trace object like this is invalid: new iced.Deferrals(icedk, { parent: iced_passed_deferral, filename: "code\unicode.coffee" })

The quick fix is easy: in nodes.coffee change line 2425 from _fnrhs = new Value new Literal '"' + o.filename + '"' to _fnrhs = new Value new Literal '"' + o.filename.(/\u/g, '\u') + '"'

but i don't think this is a good one.