comparison python/testc3.py @ 162:d8c735dc31f9

Used new editor in ide
author Windel Bouwman
date Sun, 10 Mar 2013 11:36:55 +0100
parents 10330be89bc2
children 8104fc8b5e90
comparison
equal deleted inserted replaced
161:956f8e5ee48a 162:d8c735dc31f9
1 import c3 1 import c3
2 import time, ppci, x86, ir 2 import time, ppci, x86, ir
3 3
4 testsrc = """ 4 testsrc = """package test;
5 package test;
6 5
7 var u32 c, d; 6 var u32 c, d;
8 7
9 function void test1() 8 function void test1()
10 { 9 {
62 tc = c3.TypeChecker(diag) 61 tc = c3.TypeChecker(diag)
63 al = c3.Analyzer(diag) 62 al = c3.Analyzer(diag)
64 cg = c3.CodeGenerator() 63 cg = c3.CodeGenerator()
65 x86gen = x86.X86CodeGen(diag) 64 x86gen = x86.X86CodeGen(diag)
66 p.parseSource(src) 65 p.parseSource(src)
66 ok = len(diag.diags) == 0
67 if not ok:
68 return
67 tc.checkPackage(sema.mod) 69 tc.checkPackage(sema.mod)
68 print('{0} errors'.format(len(diag.diags))) 70 print('{0} errors'.format(len(diag.diags)))
69 71
70 for d in diag.diags: 72 for d in diag.diags:
71 print('ERROR:') 73 print('ERROR:')