From 63bc884e2503ebefc580c499a82460affe50628b Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 7 May 2024 09:59:21 -0700 Subject: [PATCH] types/model: fix parser for empty values --- types/model/file.go | 4 ---- types/model/file_test.go | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/model/file.go b/types/model/file.go index c614fd32..ee398309 100644 --- a/types/model/file.go +++ b/types/model/file.go @@ -249,10 +249,6 @@ func quote(s string) string { } func unquote(s string) (string, bool) { - if len(s) == 0 { - return "", false - } - // TODO: single quotes if len(s) >= 3 && s[:3] == `"""` { if len(s) >= 6 && s[len(s)-3:] == `"""` { diff --git a/types/model/file_test.go b/types/model/file_test.go index d51c8d70..8e71760c 100644 --- a/types/model/file_test.go +++ b/types/model/file_test.go @@ -489,6 +489,10 @@ You are a store greeter. Always responsed with "Hello!". """ MESSAGE user Hey there! MESSAGE assistant Hello, I want to parse all the things! +`, + ` +FROM foo +SYSTEM "" `, }