simonask / snow-deprecated

(ATTENTION WATCHERS: This repository is deprecated. Please watch 'snow' instead.) Snow is a simple, dynamic, and expressive programming language with an emphasis on speed and simplicity. Snow is fully object-oriented, and fully function-oriented at the same time.
http://snow.meta.io/
Other
21 stars 1 forks source link

Control structure containing newlines are syntax errors in isn. #32

Open Mikoangelo opened 15 years ago

Mikoangelo commented 15 years ago

If you write an if statement or similar containing a newline, isn considers this a syntax error, even if this is done in a function definition (so isn correctly prompts for a continuation of the statement. This does not happen in non-interactive Snow.

snow> { if 1 = 2
snow*> end }
<eval>:1.11-13: syntax error
ERROR: Unhandled exception: An error occurred while parsing `0x101013860'.
Stack trace: 

snow>

Writing the same construct on a single line using semicolons works as expected.

Mikoangelo commented 15 years ago

This was tested on Mac OS X Leopard 10.5.7 Build 9J61, with Snow compiled for 64-bit. but same error is present in 32-bit. Revision is current HEAD, 3489b36551e3f426ac7e0885fd8d9eb19a4dca35.

ghost commented 15 years ago

If it doesn't happen in non-interactive Snow, it doesn't have anything to do with the parser.