Mercurial > lcfOS
comparison python/c3/parser.py @ 289:bd2593de3ff8
Semifix burn2
author | Windel Bouwman |
---|---|
date | Thu, 21 Nov 2013 15:46:50 +0100 |
parents | a747a45dcd78 |
children | 6aa721e7b10b |
comparison
equal
deleted
inserted
replaced
288:a747a45dcd78 | 289:bd2593de3ff8 |
---|---|
86 self.Error('Expected function, var, const or type') | 86 self.Error('Expected function, var, const or type') |
87 | 87 |
88 def parseDesignator(self): | 88 def parseDesignator(self): |
89 """ A designator designates an object """ | 89 """ A designator designates an object """ |
90 name = self.Consume('ID') | 90 name = self.Consume('ID') |
91 return astnodes.Designator(name.val, name.loc) | 91 if self.hasConsumed(':'): |
92 name2 = self.Consume('ID') | |
93 return astnodes.ImportDesignator(name.val, name2.val, name.loc) | |
94 else: | |
95 return astnodes.Designator(name.val, name.loc) | |
92 | 96 |
93 # Type system | 97 # Type system |
94 def parseTypeSpec(self): | 98 def parseTypeSpec(self): |
95 # For now, do simple type spec, just parse an ID: | 99 # For now, do simple type spec, just parse an ID: |
96 #return self.parseDesignator() | 100 #return self.parseDesignator() |