1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 // TODO(gri) should this be in package ast?
11 // The Universe scope contains all predeclared identifiers.
12 var Universe *ast.Scope
14 func def(obj *ast.Object) {
15 alt := Universe.Insert(obj)
17 panic("object declared twice")
22 Universe = ast.NewScope(nil)
25 for n, name := range BasicTypes {
28 obj := ast.NewObj(ast.Typ, name)
35 // TODO(gri) implement this