Parser.st
branchexpecco_2_11_0
changeset 4129 c690dec12b7e
parent 4079 ce26f968865a
--- a/Parser.st	Mon Dec 12 15:15:45 2016 +0100
+++ b/Parser.st	Tue Feb 21 16:54:14 2017 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
@@ -11,6 +9,8 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
+'From Smalltalk/X, Version:7.1.0.0 on 21-02-2017 at 16:52:44'                   !
+
 "{ Package: 'stx:libcomp' }"
 
 "{ NameSpace: Smalltalk }"
@@ -4288,27 +4288,29 @@
                 ].
             ]
         ] ifFalse:[receiver isSelf ifTrue:[
-            err notNil ifTrue:[
-                |subErr nOther|
-
-                "/ understood by all subclasses ?
-                nOther := 0.
-                classToCompileFor allSubclassesDo:[:eachSubclass |
-                    subErr isNil ifTrue:[
-                        selClass := eachSubclass.
-                        subErr := self checkSelector:selectorSymbol for:receiver inClass:selClass.
+            classToCompileFor notNil ifTrue:[
+                err notNil ifTrue:[
+                    |subErr nOther|
+
+                    "/ understood by all subclasses ?
+                    nOther := 0.
+                    classToCompileFor allSubclassesDo:[:eachSubclass |
+                        subErr isNil ifTrue:[
+                            selClass := eachSubclass.
+                            subErr := self checkSelector:selectorSymbol for:receiver inClass:selClass.
+                        ] ifFalse:[
+                            (self checkSelector:selectorSymbol for:receiver inClass:selClass) notNil ifTrue:[ nOther := nOther + 1 ].
+                        ]
+                    ].
+                    subErr notNil ifTrue:[
+                        nOther > 0 ifTrue:[
+                            err := subErr, (' in %1 other subclass(es), this class or superclass chain' bindWith:nOther)
+                        ] ifFalse:[
+                            err := subErr, ', in this class or superclass chain'
+                        ].
                     ] ifFalse:[
-                        (self checkSelector:selectorSymbol for:receiver inClass:selClass) notNil ifTrue:[ nOther := nOther + 1 ].
-                    ]
-                ].
-                subErr notNil ifTrue:[
-                    nOther > 0 ifTrue:[
-                        err := subErr, (' in %1 other subclass(es), this class or superclass chain' bindWith:nOther)
-                    ] ifFalse:[
-                        err := subErr, ', in this class or superclass chain'
+                        err := err, ', in this class or superclass chain'.
                     ].
-                ] ifFalse:[
-                    err := err, ', in this class or superclass chain'.
                 ].
             ].
         ] ifFalse:[(receiver isUnaryMessage
@@ -5420,6 +5422,28 @@
     selector := aParser selector.
 ! !
 
+!Parser methodsFor:'inspecting'!
+
+inspector2TabSTXParseTreeInspector
+    <inspector2Tab>
+
+    ^ (self newInspector2Tab)
+	label:'Parse Tree (ST/X)';
+	priority:36;
+	application:
+		[
+		    | src parser |
+
+		    source isExternalStream ifFalse:[
+			src := source collection
+		    ].
+		    SmallSense::ParseTreeInspector new node:tree source:src.
+		];
+	yourself
+
+    "Created: / 15-10-2014 / 11:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !Parser methodsFor:'obsolete'!
 
 correctByDeleting