cue/literal: expose some internal data

1) whether a multi-line string was parsed
2) the whitespace common to each line of multiline strings.

Change-Id: I69cbdab6c464908fa89ebc1cefa412990df341f2
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9242
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/cue/literal/quote.go b/cue/literal/quote.go
index 3d5ac2a..9cbe6e8 100644
--- a/cue/literal/quote.go
+++ b/cue/literal/quote.go
@@ -40,7 +40,7 @@
 // - QuoteExact that fails with an error if a string cannot be represented
 //   without loss.
 // - Handle auto-breaking for long lines (Swift-style, \-terminated lines).
-//   This is not supported yet in CUE, but may, and should be considred as
+//   This is not supported yet in CUE, but may, and should be considered as
 //   a possibility in API design.
 // - Other possible convenience forms: Blob (auto-break bytes), String (bytes
 //   or string), Label.
diff --git a/cue/literal/string.go b/cue/literal/string.go
index 8fa52d9..59fae0a 100644
--- a/cue/literal/string.go
+++ b/cue/literal/string.go
@@ -59,6 +59,16 @@
 	return q.char == '"'
 }
 
+// IsMulti reports whether a multi-line string was parsed.
+func (q QuoteInfo) IsMulti() bool {
+	return q.multiline
+}
+
+// Whitespace returns prefix whitespace for multiline strings.
+func (q QuoteInfo) Whitespace() string {
+	return q.whitespace
+}
+
 // ParseQuotes checks if the opening quotes in start matches the ending quotes
 // in end and reports its type as q or an error if they do not matching or are
 // invalid. nStart indicates the number of bytes used for the opening quote.