mirror of
https://github.com/golang/go
synced 2024-11-26 17:56:55 -07:00
6dd92ea6cb
- better debugging support - removed dead code R=r OCL=13680 CL=13680
39 lines
962 B
Go
Executable File
39 lines
962 B
Go
Executable File
// 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, LABEL, PTYPE, EOS
|
|
const /* kind */ (
|
|
BAD = iota; // error handling
|
|
CONST; TYPE; VAR; FUNC; PACKAGE; LABEL;
|
|
PTYPE; // primary type (import/export only)
|
|
EOS; // end of scope (import/export only)
|
|
)
|
|
|
|
|
|
// The 'Object' declaration should be here as well, but 6g cannot handle
|
|
// this due to cross-package circular references. For now it's all in
|
|
// globals.go.
|
|
|
|
|
|
export KindStr
|
|
func KindStr(kind int) string {
|
|
switch kind {
|
|
case BAD: return "BAD";
|
|
case CONST: return "CONST";
|
|
case TYPE: return "TYPE";
|
|
case VAR: return "VAR";
|
|
case FUNC: return "FUNC";
|
|
case PACKAGE: return "PACKAGE";
|
|
case LABEL: return "LABEL";
|
|
case PTYPE: return "PTYPE";
|
|
case EOS: return "EOS";
|
|
}
|
|
return "<unknown Object kind>";
|
|
}
|