mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
impliment garbage collection and move init
This commit is contained in:
13
src/main.go
13
src/main.go
@@ -17,15 +17,18 @@ func newscope() ArObject {
|
||||
}
|
||||
|
||||
func main() {
|
||||
initRandom()
|
||||
garbageCollect()
|
||||
global := makeGlobal()
|
||||
if len(Args) == 0 {
|
||||
shell(global)
|
||||
os.Exit(0)
|
||||
}
|
||||
ex, e := os.Getwd()
|
||||
if e != nil {
|
||||
panic(e)
|
||||
}
|
||||
if len(Args) == 0 {
|
||||
shell()
|
||||
os.Exit(0)
|
||||
}
|
||||
_, err := importMod(Args[0], ex, true)
|
||||
_, err := importMod(Args[0], ex, true, global)
|
||||
if err.EXISTS {
|
||||
panicErr(err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user