*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 12 Feb 1999 14:12:55 +0100
changeset 807 8434698556de
parent 806 bbfd3018e32e
child 808 5411c7653c75
*** empty log message ***
Parser.st
--- a/Parser.st	Fri Feb 12 14:08:04 1999 +0100
+++ b/Parser.st	Fri Feb 12 14:12:55 1999 +0100
@@ -1549,15 +1549,31 @@
      serve as a methods specification source code.
      To be used for code generators"
 
-    ^ self methodSpecificationForSelector:aSelector 
-				 argNames:#('arg1' 'arg2' 'arg3' 'arg4' 'arg5' 'arg6'
-					    'arg7' 'arg8' 'arg9' 'arg10' 'arg11' 'arg12'
-					    'arg13' 'arg14' 'arg15')
+    |argNames n|
+
+    n := aSelector numArgs.
+    n == 1 ifTrue:[
+        argNames := #('arg')
+    ] ifFalse:[
+        n <= 15 ifTrue:[
+            argNames := #('arg1' 'arg2' 'arg3' 'arg4' 'arg5' 'arg6'
+                          'arg7' 'arg8' 'arg9' 'arg10' 'arg11' 'arg12'
+                          'arg13' 'arg14' 'arg15')
+        ] ifFalse:[
+            argNames := (1 to:aSelector numArgs) collect:[:i | 'arg' , i printString].
+        ].
+    ].
+    ^ self methodSpecificationForSelector:aSelector argNames:argNames
+
     "
+     Parser methodSpecificationForSelector:#foo:   
      Parser methodSpecificationForSelector:#foo:bar:   
+     Parser methodSpecificationForSelector:#foo:bar:baz:   
      Parser methodSpecificationForSelector:#+       
      Parser methodSpecificationForSelector:#negated   
     "
+
+    "Modified: / 12.2.1999 / 13:12:44 / cg"
 !
 
 methodSpecificationForSelector:aSelector argNames:argNames
@@ -4709,6 +4725,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.191 1999-02-12 13:08:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.192 1999-02-12 13:12:55 cg Exp $'
 ! !
 Parser initialize!