text/scanner: add examples
text/scanner: add examples

Added examples for use of Mode, Whitespace, and IsIdentRune properties.

Fixes #23768

Change-Id: I2528e14fde63a4476f3c25510bf0c5b73f38ba5d
Reviewed-on: https://go-review.googlesource.com/93199
Run-TryBot: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>
Reviewed-by: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>

josharian/go,golang/go,cloudflare/go,Cofyc/go,Cofyc/go,CAFxX/go,akutz/go,cloudflare/go,CAFxX/go,Cofyc/go,akutz/go,nawawi/go,nawawi/go,josharian/go,codestation/go,josharian/go,CAFxX/go,nawawi/go,cloudflare/go,josharian/go,codestation/go,codestation/go,golang/go,cloudflare/go,Cofyc/go,akutz/go,Cofyc/go,Cofyc/go,nawawi/go,codestation/go,golang/go,codestation/go,golang/go,josharian/go,akutz/go,nawawi/go,golang/go,akutz/go,akutz/go,CAFxX/go,golang/go,CAFxX/go,cloudflare/go,cloudflare/go,golang/go,nawawi/go,codestation/go,Cofyc/go,codestation/go,akutz/go,josharian/go,cloudflare/go,nawawi/go,golang/go,Cofyc/go,codestation/go,cloudflare/go,akutz/go,CAFxX/go,josharian/go,nawawi/go,CAFxX/go,CAFxX/go,josharian/go