From 90888a7bcdc2279d445cbaa5ded9954504f21307 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Tue, 24 Nov 2020 19:10:01 +0000 Subject: [PATCH] Fix the REP loop to terminate early in case of any ParseError --- bootstrap/pkg/core/core.go | 1 + bootstrap/pkg/core/parser.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/pkg/core/core.go b/bootstrap/pkg/core/core.go index 762a9cb..2aa63b9 100644 --- a/bootstrap/pkg/core/core.go +++ b/bootstrap/pkg/core/core.go @@ -32,6 +32,7 @@ func rep(rt *Runtime, line string) { if err != nil { PrintError(rt, err) + return } // Debug data, ugly right ? :)) diff --git a/bootstrap/pkg/core/parser.go b/bootstrap/pkg/core/parser.go index c8b94c7..316cf79 100644 --- a/bootstrap/pkg/core/parser.go +++ b/bootstrap/pkg/core/parser.go @@ -88,7 +88,7 @@ func (sp *StringParser) Buffer() *[]string { func makeErrorAtPoint(p IParsable, msg string, a ...interface{}) IError { n := MakeSinglePointNode(p.Buffer(), p.GetLocation()) - return MakeParsetimeErrorf(n, msg, a) + return MakeParsetimeErrorf(n, msg, a...) } func makeErrorFromError(parser IParsable, e error) IError {