cmd/compile: stop representing keywords as Syms

Instead add a dedicated keywords map for use in lexer.ident and drop
Sym's Lexical field.

Change-Id: Ia668e65499035ff7167fabbbd0cd027102b21231
Reviewed-on: https://go-review.googlesource.com/19935
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Matthew Dempsky 2016-02-26 01:37:28 -08:00
parent af558acc47
commit 071e43a958
3 changed files with 104 additions and 110 deletions

View file

@ -238,9 +238,8 @@ func (pkg *Pkg) Lookup(name string) *Sym {
}
s := &Sym{
Name: name,
Pkg: pkg,
Lexical: LNAME,
Name: name,
Pkg: pkg,
}
if name == "init" {
initSyms = append(initSyms, s)