2 Commits

Author SHA1 Message Date
amery 7d53845bef parser: SplitCommaArray [WIP]
Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-04 15:37:14 +00:00
amery 7bed648af3 parser: Unquoted(), AcceptQuotedString() [WIP]
TODO: escaped characters

Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-04 15:33:46 +00:00
+1 -18
View File
@@ -69,26 +69,9 @@ func lexQuotedStringNoEscape(p *TextParser) (string, bool, *lexer.Error) {
}
func lexQuotedStringEscaped(*TextParser) (string, *lexer.Error) {
return "", nil
panic("not implemented")
}
// // escaped. append partial
// mark = lexQuotedAppendPartial(p, &buf, mark)
//
// r2, _, err := p.ReadRune()
// switch {
// case err != nil:
// // incomplete
// return "", NewErrIncompleteQuotedString(p)
// case IsNewLine(r2):
// // escaped new line
// p.UnreadRune()
// p.AcceptNewLine()
// mark = lexQuotedAppendNewLine(p, &buf, mark)
// default:
// // bad escaped
// }
// Unquoted removes quotes and unescapes the content
func Unquoted(s string) (string, error) {
var p TextParser