diff options
author | Robert Griesemer <gri@golang.org> | 2008-07-10 17:21:23 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2008-07-10 17:21:23 -0700 |
commit | d1284ef9f08ad1b342a27b2f5de064b07bb45d03 (patch) | |
tree | 77d68f216b633c3bf58b95518cdcee6695774049 /usr/gri/src/object.go | |
parent | ca6079deade34725c2cfbd59dccec7d26a3ed305 (diff) | |
download | golang-d1284ef9f08ad1b342a27b2f5de064b07bb45d03.tar.gz |
- more frontend pieces in Go
SVN=126744
Diffstat (limited to 'usr/gri/src/object.go')
-rwxr-xr-x | usr/gri/src/object.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/usr/gri/src/object.go b/usr/gri/src/object.go new file mode 100755 index 000000000..cf1a432aa --- /dev/null +++ b/usr/gri/src/object.go @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package Object + +import Globals "globals" + + +export BAD, CONST, TYPE, VAR, FUNC, PACKAGE +const /* kind */ ( + BAD = iota; // error handling + CONST; TYPE; VAR; FUNC; PACKAGE; + PTYPE; // primary type (import/export only) +) + + +type Object Globals.Object + + +func NewObject(kind int, name string) *Object { + obj := new(Object); + obj.mark = false; + obj.kind = kind; + obj.name = name; + obj.type_ = nil; // Universe::undef_t; + obj.pnolev = 0; + return obj; +} |