17 lines
318 B
Odin
17 lines
318 B
Odin
package main
|
|
|
|
import "./compiler"
|
|
import "core:fmt"
|
|
import "core:os/os2"
|
|
|
|
main :: proc() {
|
|
if len(os2.args) != 4 || os2.args[2] != "-o" {
|
|
fmt.eprintln("usage: brolang <input.bro> -o <executable>")
|
|
os2.exit(2)
|
|
}
|
|
status := compiler.compile_file(os2.args[1], os2.args[3])
|
|
if status != 0 {
|
|
os2.exit(status)
|
|
}
|
|
}
|