Mercurial > lcfOS
diff python/c3/typecheck.py @ 152:b73bc14a3aa3
Light coupling ide and c3 frontend
author | Windel Bouwman |
---|---|
date | Sat, 02 Mar 2013 09:56:12 +0100 |
parents | 4ae0e02599de |
children | b28a11c01dbe |
line wrap: on
line diff
--- a/python/c3/typecheck.py Fri Mar 01 17:13:56 2013 +0100 +++ b/python/c3/typecheck.py Sat Mar 02 09:56:12 2013 +0100 @@ -4,14 +4,11 @@ from .astnodes import IfStatement, WhileStatement, ReturnStatement from .astnodes import FunctionType, BaseType from . import astnodes -from ppci.errors import CompilerException from .scope import topScope class TypeChecker: def __init__(self, diag): self.diag = diag - def err(self, msg, loc): - self.diag.diag(CompilerException(msg, loc)) def checkPackage(self, pkg): for s in pkg.scope: self.check(s) @@ -20,7 +17,7 @@ return d.scope.getSymbol(d.tname) else: msg = 'Cannot resolve name {0}'.format(d.tname) - self.err(msg, d.loc) + self.diag.error(msg, d.loc) def check(self, sym): if type(sym) is Variable: if type(sym.typ) is Designator: