v0.3.3: is lib word, UTF–8 string support

This commit is contained in:
Luxferre
2026-07-07 08:27:15 +03:00
parent 6ccd7e7350
commit 07e9fe4651
2 changed files with 1 additions and 19 deletions
-16
View File
@@ -533,19 +533,3 @@ func NewClyx(libfname string, libCode string) *Clyx {
}
return c
}
func RunFile(filePath string, libCode string) {
content, err := os.ReadFile(filePath)
if err != nil {
fmt.Fprintf(os.Stderr, "Error executing %s: %v\n", filePath, err)
os.Exit(1)
}
defer func() {
if r := recover(); r != nil { fmt.Fprintf(os.Stderr, "Error executing %s: %v\n", filePath, r); os.Exit(1) }
}()
c := NewClyx("", libCode)
c.Run(string(content))
if c.HasWord("_main") {
c.Run("_main")
}
}