class: Method
authorStefan Vogel <sv@exept.de>
Mon, 08 Jun 2015 17:50:12 +0200
changeset 18462 c45bfbc05503
parent 18460 8c545d355fd2
child 18463 8c5f3917b2e8
class: Method added: #binarySelectorCharacters #maxBinarySelectorSize Moved from Scanner to make package dependencies consistent
Method.st
--- a/Method.st	Mon Jun 08 02:24:56 2015 +0200
+++ b/Method.st	Mon Jun 08 17:50:12 2015 +0200
@@ -237,6 +237,12 @@
 
 !Method class methodsFor:'queries'!
 
+binarySelectorCharacters
+    "return a collection of characters which are allowed in binary selectors"
+
+    ^ '&-+=*/\<>~@,?!!|%#'.
+!
+
 isBuiltInClass
     "return true if this class is known by the run-time-system.
      Here, true is returned for myself, false for subclasses."
@@ -246,6 +252,20 @@
     "Modified: 23.4.1996 / 15:59:50 / cg"
 !
 
+maxBinarySelectorSize
+    ^ 3
+
+    "
+     in ST/X, binops are allowed with up-to 3 characters;
+     for example:
+        <->
+        <=>
+        +++
+        :=:
+     etc. are valid binOps here
+    "
+!
+
 methodDefinitionTemplateForSelector:aSelector
     "given a selector, return a prototype definition string"
 
@@ -3911,11 +3931,11 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.464 2015-06-05 16:10:36 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.465 2015-06-08 15:50:12 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.464 2015-06-05 16:10:36 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.465 2015-06-08 15:50:12 stefan Exp $'
 !
 
 version_SVN