Skip to content

Releases: shockerli/spiker

v0.0.3

27 Apr 08:23
Compare
Choose a tag to compare
  • support register function
spiker.RegisterFunc("log", func(fnc *spiker.NodeFuncCallOp, scope *spiker.VariableScope) interface{} {
	for _, p := range fnc.Params {
		log.Println(spiker.EvalExpr(p, scope))
	}
	return nil
})

v0.0.2

25 Dec 11:13
Compare
Choose a tag to compare
  • support custom function declare and call
sum = (a, b) -> a + b;

export(sum(1, 2)); # 3
pow2 = x -> x ** 2;

export(pow2(5)); # 25
max = (a, b) -> {
    if (a > b) {
        return a;
    } else {
        return b;
    }
};

export(max(1, 2)); # 2
  • rewrite builtin function
  • fix while/if statements break/continue
  • improve export()

v0.0.1

06 Nov 03:01
Compare
Choose a tag to compare
v0.0.1