diff python/c3/parser.py @ 289:bd2593de3ff8

Semifix burn2
author Windel Bouwman
date Thu, 21 Nov 2013 15:46:50 +0100
parents a747a45dcd78
children 6aa721e7b10b
line wrap: on
line diff
--- a/python/c3/parser.py	Thu Nov 21 14:26:13 2013 +0100
+++ b/python/c3/parser.py	Thu Nov 21 15:46:50 2013 +0100
@@ -88,7 +88,11 @@
     def parseDesignator(self):
         """ A designator designates an object """
         name = self.Consume('ID')
-        return astnodes.Designator(name.val, name.loc)
+        if self.hasConsumed(':'):
+            name2 = self.Consume('ID')
+            return astnodes.ImportDesignator(name.val, name2.val, name.loc)
+        else:
+            return astnodes.Designator(name.val, name.loc)
 
     # Type system
     def parseTypeSpec(self):