gllvm/gowllvm.go

27 lines
507 B
Go
Raw Normal View History

2017-06-22 01:34:56 +02:00
package main
import(
"os"
2017-06-22 21:14:00 +02:00
"log"
2017-06-22 01:34:56 +02:00
)
func main() {
// Parse command line
var args = os.Args
if len(args) < 2 {
2017-06-22 21:14:00 +02:00
log.Fatal("Not enough arguments.")
2017-06-22 01:34:56 +02:00
}
var modeFlag = args[1]
args = args[2:]
switch modeFlag {
case "compile":
// Call main compile function with args
compile(args)
case "extract":
2017-06-22 21:14:00 +02:00
log.Fatal("The extract feature is not implemented yet.")
2017-06-22 01:34:56 +02:00
default:
2017-06-22 21:14:00 +02:00
log.Fatal("You should call gowllvm with a valid mode.")
2017-06-22 01:34:56 +02:00
}
}