comparison python/c3/analyse.py @ 255:7416c923a02a

Added more logging
author Windel Bouwman
date Sun, 04 Aug 2013 15:10:10 +0200
parents 6ed3d3a82a63
children e64bae57cda8
comparison
equal deleted inserted replaced
254:bd26dc13f270 255:7416c923a02a
1 import logging
1 from .visitor import Visitor 2 from .visitor import Visitor
2 from .astnodes import * 3 from .astnodes import *
3 from .scope import Scope, topScope 4 from .scope import Scope, topScope
4 from .typecheck import theType 5 from .typecheck import theType
5 6
9 Scope is attached to the correct modules. 10 Scope is attached to the correct modules.
10 This class checks names and references 11 This class checks names and references
11 """ 12 """
12 def __init__(self, diag): 13 def __init__(self, diag):
13 self.diag = diag 14 self.diag = diag
15 self.logger = logging.getLogger('c3')
14 16
15 def analyzePackage(self, pkg, packageProvider): 17 def analyzePackage(self, pkg, packageProvider):
18 self.logger.info('Checking package {}'.format(pkg.name))
16 self.ok = True 19 self.ok = True
17 visitor = Visitor() 20 visitor = Visitor()
18 # Prepare top level scope: 21 # Prepare top level scope:
19 self.scopeStack = [topScope] 22 self.scopeStack = [topScope]
20 modScope = Scope(self.CurrentScope) 23 modScope = Scope(self.CurrentScope)