| 
									
										
										
										
											2008-07-10 17:21:23 -07:00
										 |  |  | // 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" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-08-04 10:19:36 -07:00
										 |  |  | export const /* kind */ ( | 
					
						
							| 
									
										
										
										
											2008-07-10 17:21:23 -07:00
										 |  |  | 	BAD = iota;  // error handling | 
					
						
							| 
									
										
										
										
											2008-08-11 20:40:37 -07:00
										 |  |  | 	CONST; TYPE; VAR; FIELD; FUNC; PACKAGE; LABEL; | 
					
						
							| 
									
										
										
										
											2008-08-01 14:50:18 -07:00
										 |  |  | 	END;  // end of scope (import/export only) | 
					
						
							| 
									
										
										
										
											2008-07-10 17:21:23 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-14 16:57:42 -07:00
										 |  |  | // 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. | 
					
						
							| 
									
										
										
										
											2008-07-30 21:26:15 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-08-04 15:37:47 -07:00
										 |  |  | export func KindStr(kind int) string { | 
					
						
							| 
									
										
										
										
											2008-07-30 21:26:15 -07:00
										 |  |  | 	switch kind { | 
					
						
							|  |  |  | 	case BAD: return "BAD"; | 
					
						
							|  |  |  | 	case CONST: return "CONST"; | 
					
						
							|  |  |  | 	case TYPE: return "TYPE"; | 
					
						
							|  |  |  | 	case VAR: return "VAR"; | 
					
						
							| 
									
										
										
										
											2008-08-11 20:40:37 -07:00
										 |  |  | 	case FIELD: return "FIELD"; | 
					
						
							| 
									
										
										
										
											2008-07-30 21:26:15 -07:00
										 |  |  | 	case FUNC: return "FUNC"; | 
					
						
							|  |  |  | 	case PACKAGE: return "PACKAGE"; | 
					
						
							|  |  |  | 	case LABEL: return "LABEL"; | 
					
						
							| 
									
										
										
										
											2008-08-01 14:50:18 -07:00
										 |  |  | 	case END: return "END"; | 
					
						
							| 
									
										
										
										
											2008-07-30 21:26:15 -07:00
										 |  |  | 	} | 
					
						
							|  |  |  | 	return "<unknown Object kind>"; | 
					
						
							|  |  |  | } |