MCPcopy Create free account
hub / github.com/crossoverJie/gscript / main

Function main

cmd/gscript.go:13–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11)
12
13func main() {
14
15 if len(os.Args) >= 2 {
16 file, err := os.ReadFile(os.Args[1])
17 if err != nil {
18 panic(fmt.Sprintf("read script fail, err:%+v", err))
19 }
20 gscript.Args = os.Args
21 gscript.NewCompiler().Compiler(string(file))
22
23 } else {
24 repl()
25 }
26
27}
28
29func repl() {
30 s := flag.String("x", "run", "debug or run, the debug mode will print the AST tree.")

Callers

nothing calls this directly

Calls 3

NewCompilerFunction · 0.92
replFunction · 0.85
CompilerMethod · 0.80

Tested by

no test coverage detected