comparison python/c3/parser.py @ 227:82dfe6a32717

Fixed tests
author Windel Bouwman
date Fri, 12 Jul 2013 17:42:39 +0200
parents 240111e0456f
children 7f18ed9b6b7e
comparison
equal deleted inserted replaced
226:240111e0456f 227:82dfe6a32717
88 self.Consume('{') 88 self.Consume('{')
89 mems = [] 89 mems = []
90 while self.Peak != '}': 90 while self.Peak != '}':
91 mem_t = self.parseTypeSpec() 91 mem_t = self.parseTypeSpec()
92 mem_n = self.Consume('ID').val 92 mem_n = self.Consume('ID').val
93 mems.append((mem_t, mem_n)) 93 mems.append(astnodes.StructField(mem_n, mem_t))
94 while self.hasConsumed(','): 94 while self.hasConsumed(','):
95 mem_n = self.Consume('ID').val 95 mem_n = self.Consume('ID').val
96 mems.append((mem_t, mem_n)) 96 mems.append(astnodes.StructField(mem_n, mem_t))
97 self.Consume(';') 97 self.Consume(';')
98 self.Consume('}') 98 self.Consume('}')
99 theT = astnodes.StructureType(mems) 99 theT = astnodes.StructureType(mems)
100 else: 100 else:
101 theT = self.parseDesignator() 101 theT = self.parseDesignator()