Closed muirdm closed 3 years ago
Does that mean var x chan[5]int
will not highlight correctly now?
I guess that's acceptable, since that's never gofmt'ed. I missed that foo[1]*10
can actually occur in a gofmt'ed context.
This breaks fontification of "float64" in map[string]map[string]float64
. It appears we were depending [string]float64
looking like an array.
Closing for now.
OK - I think I resolved the "map" issues I noted above.
In "foo[1]10" we were interpreting "[1]10" as an array with element type "10". At first I was going to fix the identifier regex to disallow leading numbers (so "10" couldn't be a type name), but that is involved and doesn't fix the similar case of "foo[1]foo[2]". Instead fix the array type detection to disallow an identifier character preceding the opening bracket.
Fixes #382.