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

Invoking a function using `it` doesn't work. #47

Closed Mikoangelo closed 15 years ago

Mikoangelo commented 15 years ago

The following code:

tester: Object.new()
tester.__call__: { print("Works.") }

closure_implicit: { it(#hm) } // An argument is necessary, but ignored. See issue #46.
closure_named: [a_tester] { a_tester() }

print("Implicit: ") closure_implicit(tester) puts()
print("Named: ") closure_named(tester) puts()

Generates the following output:

Implicit: 
Named: Works.
Mikoangelo commented 15 years ago

Whoop, forgot to mention it on this one: Mac OS X 10.5.7, x86_64, 9704c6ac454698a2268f840daaa56c012c239571.

ghost commented 15 years ago

Aha! The last two lines are actually supposed to be syntax errors - multiple statements on one line = very bad, and is probably the source of a lot of shift/reduce conflict. Making a new ticket.

ghost commented 15 years ago

This one was fixed in 8685e30f25bce1445068dd3f9b980a862282b375 as well.