probmods / webchurch

A Church to Javascript compiler (DEPRECATED)
Other
140 stars 15 forks source link

Comments bug #74

Closed toncho11 closed 8 years ago

toncho11 commented 8 years ago

If I add ";" and a comment the whole script crashes.

I do execute it as follow on Windows 7:

node church scriptname.txt

longouyang commented 8 years ago

I can't reproduce this error -- can you provide the script you used?

toncho11 commented 8 years ago

This is the file. It says: 1-19: Unclosed parens

GoodMood.txt

There is a comment on line 4 and it works on probmods.org.

longouyang commented 8 years ago

I tried your script on OS X and didn't get an error.

What version of webchurch are you running?

toncho11 commented 8 years ago

It is on Windows, Windows, Windows... I followed the non git instructions.

longouyang commented 8 years ago

Ah - I think I figured it out. Your file has both newlines \n and carriage returns \r.

webchurch doesn't like these, so you'll have to switch to an editor that doesn't insert carriage returns (also, make sure it saves the file as UTF-8)

longouyang commented 8 years ago

(Actually, it turns out this was an easy enough bug to fix, so if you install the latest webchurch that model should just work now, without having to switch editors)