mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Get symtable to limp along, can run compiler/symbols.py. Not saying much, needs more work.
This commit is contained in:
		
							parent
							
								
									545d4962f5
								
							
						
					
					
						commit
						21d19f7203
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -13,7 +13,10 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def symtable(code, filename, compile_type):
 | 
					def symtable(code, filename, compile_type):
 | 
				
			||||||
    raw = _symtable.symtable(code, filename, compile_type)
 | 
					    raw = _symtable.symtable(code, filename, compile_type)
 | 
				
			||||||
    return newSymbolTable(raw[0], filename)
 | 
					    for top in raw.itervalues():
 | 
				
			||||||
 | 
					        if top.name == 'top':
 | 
				
			||||||
 | 
					            break
 | 
				
			||||||
 | 
					    return newSymbolTable(top, filename)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SymbolTableFactory:
 | 
					class SymbolTableFactory:
 | 
				
			||||||
    def __init__(self):
 | 
					    def __init__(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue