You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"golox/lox"
|
|
)
|
|
|
|
func main() {
|
|
nbArgs := len(os.Args)
|
|
|
|
if nbArgs > 2 {
|
|
fmt.Println("Usage: golox [script]")
|
|
os.Exit(64)
|
|
} else if nbArgs == 2 {
|
|
lox.RunFile(os.Args[1])
|
|
} else {
|
|
lox.RunPrompt()
|
|
}
|
|
}
|