Mercurial > lcfOS
comparison python/c3/builder.py @ 225:1c7364bd74c7
Fixed pointer deref
author | Windel Bouwman |
---|---|
date | Thu, 11 Jul 2013 07:42:30 +0200 |
parents | c1ccb1cb4cef |
children | 240111e0456f |
comparison
equal
deleted
inserted
replaced
224:5af52987f5bd | 225:1c7364bd74c7 |
---|---|
1 import ppci | 1 import ppci |
2 from . import Parser, TypeChecker, Analyzer, CodeGenerator | 2 from . import Parser, TypeChecker, Analyzer, CodeGenerator |
3 from . astprinter import AstPrinter | |
3 | 4 |
4 class Builder: | 5 class Builder: |
5 """ | 6 """ |
6 Generates IR-code from c3 source. | 7 Generates IR-code from c3 source. |
7 Reports errors to the diagnostics system | 8 Reports errors to the diagnostics system |
17 pkg = self.parser.parseSource(src) | 18 pkg = self.parser.parseSource(src) |
18 if not pkg: | 19 if not pkg: |
19 return | 20 return |
20 self.pkg = pkg | 21 self.pkg = pkg |
21 # TODO: merge the two below? | 22 # TODO: merge the two below? |
23 #AstPrinter().printAst(pkg) | |
22 if not self.al.analyzePackage(pkg): | 24 if not self.al.analyzePackage(pkg): |
23 return | 25 return |
24 if not self.tc.checkPackage(pkg): | 26 if not self.tc.checkPackage(pkg): |
25 return | 27 return |
26 | 28 |