diff options
| author | Marc Vertes <mvertes@free.fr> | 2025-11-27 12:40:35 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2025-11-27 12:40:35 +0100 |
| commit | d99d69391eeae129cad2d5c2c90ce700db01b11c (patch) | |
| tree | 0286d21e88919b9a9f86081d057b065c19f8ec38 /main.go | |
| parent | aed20c1c453e50f716c454c0bd7e4995a0f5d898 (diff) | |
chore: move compiler and interpreter in their own packages
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,8 +11,8 @@ import ( "reflect" "strings" + "github.com/mvertes/parscan/interpreter" "github.com/mvertes/parscan/lang/golang" - "github.com/mvertes/parscan/parser" "github.com/mvertes/parscan/scanner" ) @@ -76,7 +76,7 @@ func run(arg []string) (err error) { } args := rflag.Args() - interp := parser.NewInterpreter(scanner.NewScanner(golang.GoSpec)) + intpr := interpreter.NewInterpreter(scanner.NewScanner(golang.GoSpec)) var in io.Reader if str != "" { @@ -94,13 +94,13 @@ func run(arg []string) (err error) { } if isatty(in) { - return repl(interp, in) + return repl(intpr, in) } buf, err := io.ReadAll(in) if err != nil { return err } - _, err = interp.Eval(string(buf)) + _, err = intpr.Eval(string(buf)) return err } |
