Parser.st
changeset 363 fb9565dd2770
parent 362 b2ff93e77a72
child 364 dedafa4f9c67
--- a/Parser.st	Tue Oct 15 11:29:24 1996 +0200
+++ b/Parser.st	Tue Oct 15 13:26:09 1996 +0200
@@ -2780,53 +2780,57 @@
         self nextToken.
 
         (tokenType == #'::') ifTrue:[
-            nameSpace := name.
-
-            self nextToken.
-            (tokenType == #Identifier) ifTrue:[
-                ignoreWarnings ifFalse:[
-                    warnSTXNameSpaceUse ifTrue:[
-                        self warning:'nameSpaces are a nonstandard feature of ST/X' 
-                             position:pos to:(source position).
-                        "
-                         only warn once
-                        "
-                        warnSTXNameSpaceUse := false
-                    ]
-                ].
-                name := tokenName.
-
-                globlName := (nameSpace , '::' , name).
-
-                nameSpaceGlobal := Smalltalk at:nameSpace asSymbol ifAbsent:nil.
-                nameSpaceGlobal isNil ifTrue:[
-                    self parseError:('unknown nameSpace: ', nameSpace) position:pos to:tokenPosition-1.
-                    errorFlag := true
-                ] ifFalse:[
-                    nameSpaceGlobal isNamespace ifTrue:[
-                        "/ for now: only Smalltalk is allowed
-                        nameSpaceGlobal ~~ Smalltalk ifTrue:[
-                            self parseError:('(currently) the only valid nameSpace is `Smalltalk''') position:pos to:tokenPosition-1.
-                            errorFlag := true
-                        ].
-                        globlName := name
-                    ] ifFalse:[
-                        nameSpaceGlobal isBehavior ifFalse:[
-                            self parseError:('invalid nameSpace: ' , nameSpace)  position:pos to:tokenPosition-1.
-                            errorFlag := true
-                        ] ifTrue:[
-                            (nameSpaceGlobal privateClassesAt:name asSymbol) isNil ifTrue:[
-                                self parseError:('no private class: ' , name , ' in class: ' , nameSpace)  position:pos to:tokenPosition-1.                                
-                                errorFlag := true
-                            ]
+            globlName := name.
+
+            [tokenType == #'::'] whileTrue:[
+                nameSpace := globlName.
+
+                self nextToken.
+                (tokenType == #Identifier) ifTrue:[
+                    ignoreWarnings ifFalse:[
+                        warnSTXNameSpaceUse ifTrue:[
+                            self warning:'nameSpaces are a nonstandard feature of ST/X' 
+                                 position:pos to:(source position).
+                            "
+                             only warn once
+                            "
+                            warnSTXNameSpaceUse := false
                         ]
                     ].
+                    name := tokenName.
+
+                    globlName := (nameSpace , '::' , name).
+
+                    nameSpaceGlobal := Smalltalk at:nameSpace asSymbol ifAbsent:nil.
+                    nameSpaceGlobal isNil ifTrue:[
+                        self parseError:('unknown nameSpace: ', nameSpace) position:pos to:tokenPosition-1.
+                        errorFlag := true
+                    ] ifFalse:[
+                        nameSpaceGlobal isNamespace ifTrue:[
+                            "/ for now: only Smalltalk is allowed
+                            nameSpaceGlobal ~~ Smalltalk ifTrue:[
+                                self parseError:('(currently) the only valid nameSpace is `Smalltalk''') position:pos to:tokenPosition-1.
+                                errorFlag := true
+                            ].
+                            globlName := name
+                        ] ifFalse:[
+                            nameSpaceGlobal isBehavior ifFalse:[
+                                self parseError:('invalid nameSpace: ' , nameSpace)  position:pos to:tokenPosition-1.
+                                errorFlag := true
+                            ] ifTrue:[
+                                (nameSpaceGlobal privateClassesAt:name asSymbol) isNil ifTrue:[
+                                    self parseError:('no private class: ' , name , ' in class: ' , nameSpace)  position:pos to:tokenPosition-1.                                
+                                    errorFlag := true
+                                ]
+                            ]
+                        ].
+                    ].
+                    self nextToken.
                 ].
                 var := VariableNode
                      type:#GlobalVariable
                      name:globlName asSymbol.
                 parseForCode ifFalse:[self rememberGlobalUsed:globlName].
-                self nextToken.
             ]
         ].
 
@@ -3048,7 +3052,7 @@
     ^ #Error
 
     "Created: 13.9.1995 / 12:50:50 / claus"
-    "Modified: 15.10.1996 / 10:28:45 / cg"
+    "Modified: 15.10.1996 / 12:24:02 / cg"
 !
 
 statement
@@ -3609,6 +3613,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.91 1996-10-15 09:29:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.92 1996-10-15 11:26:09 cg Exp $'
 ! !
 Parser initialize!