debug for compilation flows
This commit is contained in:
@@ -116,6 +116,7 @@ func (r *REPL) Exec(f io.Reader) (state *VMState) {
|
||||
}
|
||||
|
||||
c := compiler.NewWithState(state.symbols, state.constants)
|
||||
c.Debug = r.opts.Debug
|
||||
err = c.Compile(program)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Woops! Compilation failed:\n %s\n", err)
|
||||
@@ -197,6 +198,7 @@ func (r *REPL) StartExecLoop(in io.Reader, out io.Writer, state *VMState) {
|
||||
}
|
||||
|
||||
c := compiler.NewWithState(state.symbols, state.constants)
|
||||
c.Debug = r.opts.Debug
|
||||
err := c.Compile(program)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Woops! Compilation failed:\n %s\n", err)
|
||||
|
||||
Reference in New Issue
Block a user