예제 #1
0
파일: builtins.go 프로젝트: sbinet/fubsy
// Return a new namespace containing all builtin functions.
func defineBuiltins() BuiltinList {
	builtins := []types.FuCallable{
		types.NewVariadicFunction("println", 0, -1, fn_println),
		types.NewVariadicFunction("mkdir", 0, -1, fn_mkdir),
		types.NewVariadicFunction("remove", 0, -1, fn_remove),

		types.NewFixedFunction("build", 3, fn_build),

		// node factories
		types.NewFixedFunction("FileNode", 1, fn_FileNode),
		types.NewFixedFunction("ActionNode", 1, fn_ActionNode),
	}
	return BuiltinList{builtins}
}
예제 #2
0
파일: findernode.go 프로젝트: sbinet/fubsy
func init() {
	methodsFinderNode = make(types.ValueMap)
	methodsFinderNode["prune"] = types.NewVariadicFunction(
		"prune", 0, -1, meth_FinderNode_prune)
}