Fix the REP loop to terminate early in case of any ParseError

This commit is contained in:
Sameer Rahmani 2020-11-24 19:10:01 +00:00
parent 52fa298a07
commit 90888a7bcd
2 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ func rep(rt *Runtime, line string) {
if err != nil {
PrintError(rt, err)
return
}
// Debug data, ugly right ? :))

View File

@ -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 {