Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddClass func(name string, usedByDefault bool, caller func(args []string, segmentName string) bool, loader func() bool) bool
View Source
var CheckOnVariable func(str string) bool
View Source
var CleanUp func(cleanClasses bool) bool
View Source
var Execute func(code, segmentName string, line int, isInIfElse bool) bool
View Source
var GetType func(str string) string
View Source
var GetTypeEx func(str string) string
View Source
var GetTypeOfVar func(str string) string
View Source
var GetVariableValue func(v string) interface{}
View Source
var IfVariableReplaceIt func(str string) interface{}
View Source
var ParseFile func(path string) bool
View Source
var PiniginShell func()
View Source
var PrintError func(str string)
View Source
var RemoveClass func(name string) bool
View Source
var RunCode func(code string) bool
View Source
var SetReturned func(varType string, value interface{}, segmentName string)
View Source
var SetVariable func(name string, value interface{}) bool
View Source
var StringToText func(str string) string
View Source
var TextToString func(str string) string
Functions ¶
func InitDinolang ¶
Example ¶
package main import ( "log" "github.com/estintax/dlbindings" ) func main() { err := dlbindings.InitDinolang("dinolang.so") if err != nil { log.Fatalln(err.Error()) return } dlbindings.AddClass("myclass", false, func(args []string, segmentName string) bool { switch args[0] { case "hello": dlbindings.SetReturned("string", "Hello, World!", segmentName) } return true }, nil) dlbindings.RunCode("use, \"myclass\"\nmyclass:hello\n") log.Println(dlbindings.GetVariableValue("returned").(string)) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.