mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
af558acc47
commit
071e43a958
3 changed files with 104 additions and 110 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue