Commit 9e497c36 authored by Russ Cox's avatar Russ Cox

gc: disallow · in Go programs

Fixes #793.

R=ken2
CC=golang-dev
https://golang.org/cl/1249043
parent b0283611
...@@ -854,7 +854,7 @@ talph: ...@@ -854,7 +854,7 @@ talph:
ungetc(c); ungetc(c);
rune = getr(); rune = getr();
// 0xb7 · is used for internal names // 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); yyerror("invalid identifier character 0x%ux", rune);
cp += runetochar(cp, &rune); cp += runetochar(cp, &rune);
} else if(!isalnum(c) && c != '_') } else if(!isalnum(c) && c != '_')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment