cue: doc improvements

Change-Id: I49ca97cbba02920e7d8182f4deefdcd1fc0db721
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7541
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
diff --git a/cue/path.go b/cue/path.go
index 79cd78c..d8f953e 100644
--- a/cue/path.go
+++ b/cue/path.go
@@ -28,7 +28,7 @@
 	"github.com/cockroachdb/apd/v2"
 )
 
-// A Selector is path component in a path.
+// A Selector is a component of a path.
 type Selector struct {
 	sel selector
 }
@@ -188,7 +188,7 @@
 }
 
 // A Def marks a string as a definition label. An # will be added if a string is
-// not prefixed with an # or _ already. Hidden labels are qualified by the
+// not prefixed with an # or _# already. Hidden labels are qualified by the
 // package in which they are looked up.
 func Def(s string) Selector {
 	if !isHiddenOrDefinition(s) {
@@ -213,7 +213,7 @@
 	case strings.HasPrefix(string(d), "_"):
 		return adt.HiddenLabel
 	default:
-		return adt.StringLabel
+		panic("invalid definition")
 	}
 }