cue: hoist literal string parsing into new package
This allows the parser and potentially other packages
to use this code without causing cycles.
Change-Id: I3df9f4a83109757f959adaecdccbc144a4975f61
diff --git a/pkg/strconv/manual.go b/pkg/strconv/manual.go
index e179ad4..cad0a30 100644
--- a/pkg/strconv/manual.go
+++ b/pkg/strconv/manual.go
@@ -14,11 +14,13 @@
package strconv
+import "cuelang.org/go/cue/literal"
+
// Unquote interprets s as a single-quoted, double-quoted,
// or backquoted CUE string literal, returning the string value
// that s quotes.
func Unquote(s string) (string, error) {
- return Unquote(s)
+ return literal.Unquote(s)
}
// TODO: replace parsing functions with parsing to apd