parse imports with fixed paths before running all the code

This commit is contained in:
2024-02-23 21:50:53 +00:00
parent 7f86d345ae
commit b3a07d7f63
6 changed files with 134 additions and 68 deletions

View File

@@ -61,11 +61,16 @@ func main() {
if e != nil {
panic(e)
}
_, err := importMod(Args[0], ex, true, global)
translated, err := translateImport(Args[0], ex, true)
if err.EXISTS {
panicErr(err)
os.Exit(1)
}
_, runimeErr := runTranslatedImport(translated, global)
if runimeErr.EXISTS {
panicErr(runimeErr)
os.Exit(1)
}
if threadCount > 0 {
<-threadChan
}