fasterthanlime / jooc-legacy

:crocodile: The historical, initial implementation of an ooc compiler in Java
http://ooc-lang.org/
MIT License
115 stars 4 forks source link

Old for() doesn't work #31

Closed richardwtf closed 15 years ago

richardwtf commented 15 years ago

The compiler doesn't like the standard for format.

I.e.:

for (i := 0; i < limit; i += step) { foo }

results in an error like

./test.ooc:9:3: Expected statement in function body. Found 'for' instead.

nddrylliog commented 15 years ago

Added. Thanks for reporting =)

http://github.com/nddrylliog/ooc/commit/670d568359fc10e76ccf792a775540e6dc654547

Added regular for in the syntax, e.g. for(i := 0; i < limit; i += step) {}. Example in tests/statements/012-regular-for.ooc