| // 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. |
| BAD = iota; // error handling |
| CONST; TYPE; VAR; FIELD; FUNC; BUILTIN; PACKAGE; LABEL; |
| END; // 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 |
| func KindStr(kind int) string { |
| case CONST: return "CONST"; |
| case TYPE: return "TYPE"; |
| case FIELD: return "FIELD"; |
| case FUNC: return "FUNC"; |
| case BUILTIN: return "BUILTIN"; |
| case PACKAGE: return "PACKAGE"; |
| case LABEL: return "LABEL"; |
| return "<unknown Object kind>"; |