From 3b135ac96326a215c2406156d3280424c381af69 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 20 Jul 2023 00:43:22 -0700 Subject: [PATCH] parser: fix case where multi line string termination error wouldnt show --- parser/parser.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/parser/parser.go b/parser/parser.go index b8007c2a..fcb50bf5 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -62,10 +62,6 @@ func Parse(reader io.Reader) ([]Command, error) { } func scanModelfile(data []byte, atEOF bool) (advance int, token []byte, err error) { - if atEOF || len(data) == 0 { - return 0, nil, nil - } - newline := bytes.IndexByte(data, '\n') if start := bytes.Index(data, []byte(`"""`)); start >= 0 && start < newline {