generate bytecode for script

It is just prototype

* does not make top level symbols visible as class members yet
* does not take parameters
* Script class name is hardcoded now
This commit is contained in:
Stepan Koltsov
2012-05-23 02:52:29 +04:00
parent d6bf8876a3
commit f4051f45ab
16 changed files with 227 additions and 15 deletions
@@ -0,0 +1,11 @@
// expected: 3628800
fun factorial(n: Int): Int {
var product = 1
for (i in 1..n) {
product *= i
}
return product
}
factorial(10)