hetu_script 0.2.0 hetu_script: ^0.2.0 copied to clipboard
Hetu is a lightweight script language for embedding in Flutter apps.
import 'package:hetu_script/hetu_script.dart';
void main() {
var hetu = Hetu();
hetu.init();
hetu.eval(r'''
fun closure(func) {
var i = 42
fun nested () {
i = i + 1
print(func(i))
}
return nested
}
fun main {
var func = closure( fun (n) { return n * n } )
func()
func()
}
''', invokeFunc: 'main');
}