cmd/compile/internal/syntax: minor cleanups in extractName
cmd/compile/internal/syntax: minor cleanups in extractName

Backport the recommended changes suggested in CL 403937.

Change-Id: I3ac29c90977e33899881838825da033627344ed2
Reviewed-on: https://go-review.googlesource.com/c/go/+/403853
Run-TryBot: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@google.com>
Reviewed-by: Robert Findley <9179eee875d1ee628c37fb47d7e749e855ffd21f@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@google.com>

nawawi/go,golang/go,nawawi/go,nawawi/go,golang/go,golang/go,golang/go,golang/go,golang/go,golang/go,nawawi/go,nawawi/go,nawawi/go,golang/go,nawawi/go,nawawi/go