restructure

This commit is contained in:
basil 2025-06-08 15:02:35 -04:00
parent edcbfde351
commit eebaadc16e
Signed by: basil
SSH key fingerprint: SHA256:y04xIFL/yqNaG9ae9Vl95vELtHfApGAIoOGLeVLP/fE
21 changed files with 937 additions and 626 deletions

31
cli/main.go Normal file
View file

@ -0,0 +1,31 @@
package main
import (
"bufio"
"fmt"
"os"
loxgo "git.red-panda.pet/pandaware/lox-go"
"git.red-panda.pet/pandaware/lox-go/reporter"
)
var (
file string
)
func main() {
reporter.SetLevel(reporter.LevelDebug)
s := bufio.NewScanner(os.Stdin)
for {
fmt.Printf("repl> ")
s.Scan()
loxgo.Run(s.Text())
if err := s.Err(); err != nil {
reporter.Fatal(1, -1, "repl", "stdin", err.Error())
}
fmt.Printf("\n")
}
}