mirror of
https://github.com/golang/go
synced 2024-11-22 00:54:43 -07:00
gc: disallow · in Go programs
Fixes #793. R=ken2 CC=golang-dev https://golang.org/cl/1249043
This commit is contained in:
parent
b0283611e4
commit
9e497c3656
@ -854,7 +854,7 @@ talph:
|
||||
ungetc(c);
|
||||
rune = getr();
|
||||
// 0xb7 · is used for internal names
|
||||
if(!isalpharune(rune) && !isdigitrune(rune) && rune != 0xb7)
|
||||
if(!isalpharune(rune) && !isdigitrune(rune) && (importpkg == nil || rune != 0xb7))
|
||||
yyerror("invalid identifier character 0x%ux", rune);
|
||||
cp += runetochar(cp, &rune);
|
||||
} else if(!isalnum(c) && c != '_')
|
||||
|
Loading…
Reference in New Issue
Block a user