Mercurial > lcfOS
diff python/c3/semantics.py @ 169:ee0d30533dae
Added more tests and improved the diagnostic update
author | Windel Bouwman |
---|---|
date | Sat, 23 Mar 2013 18:34:41 +0100 |
parents | 0b5b2ee6b435 |
children | a51b3c956386 |
line wrap: on
line diff
--- a/python/c3/semantics.py Fri Mar 22 19:09:38 2013 +0100 +++ b/python/c3/semantics.py Sat Mar 23 18:34:41 2013 +0100 @@ -5,6 +5,10 @@ """ This class constructs the AST from parser input """ def __init__(self, diag): self.diag = diag + def reinit(self): + # Set mod to empty package: + self.mod = astnodes.Package('unnamed') + self.mod.scope = Scope(topScope) def addSymbol(self, s): if self.curScope.hasSymbol(s.name): msg = 'Redefinition of {0}'.format(s.name)